Subversion Repositories gelsvn

Rev

Rev 39 | Rev 89 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 39 Rev 56
Line 1... Line 1...
1
#ifndef __RESOURCE_MANAGER_H
1
#ifndef __RESOURCE_MANAGER_H
2
#define __RESOURCE_MANAGER_H
2
#define __RESOURCE_MANAGER_H
3
 
3
 
-
 
4
#include <cassert>
4
#include <string>
5
#include <string>
5
#include <list>
6
#include <list>
6
#include <typeinfo>
7
#include <typeinfo>
7
 
8
 
8
#define CLEAN_SHUTDOWN 1
9
#define CLEAN_SHUTDOWN 1
9
 
10
 
10
namespace Components
11
namespace Util
11
{
12
{
12
 
13
 
13
	typedef unsigned char FlagByte;
14
	typedef unsigned char FlagByte;
14
	const FlagByte REMOVE_WHEN_UNUSED = 0x01;
15
	const FlagByte REMOVE_WHEN_UNUSED = 0x01;
15
	const FlagByte STATIC_RESOURCE    = 0x02;
16
	const FlagByte STATIC_RESOURCE    = 0x02;
Line 68... Line 69...
68
		{
69
		{
69
			assert(usage>=0);
70
			assert(usage>=0);
70
			++usage;
71
			++usage;
71
		}
72
		}
72
 
73
 
73
		/// Decrement the usage counter. Assert that counter is >0
74
		/// Decrement the usage counter. assert that counter is >0
74
		void decrement_usage() 
75
		void decrement_usage() 
75
		{
76
		{
76
			assert(usage>0);
77
			assert(usage>0);
77
			--usage;
78
			--usage;
78
		}
79
		}
Line 376... Line 377...
376
		ResourcePtr<RES> ptr = man.register_resource(str, res, true);
377
		ResourcePtr<RES> ptr = man.register_resource(str, res, true);
377
		return ptr;
378
		return ptr;
378
	}
379
	}
379
 
380
 
380
}
381
}
381
namespace CMP = Components;
-
 
382
 
382
 
383
 
383
 
384
#endif
384
#endif