CrossFramework Library

XBase/IAllocator.hpp

説明を見る。
00001 
00006 #if defined(XBASE_INCLUDED_IALLOCATOR_HPP)
00007 #else
00008 #define XBASE_INCLUDED_IALLOCATOR_HPP
00009 
00010 //------------------------------------------------------------
00011 #include <XBase/BuiltInTypes.hpp>
00012 
00013 //------------------------------------------------------------
00014 namespace XBase {
00016 
00017 
00018     class IAllocator
00019     {
00020     public:
00021         virtual ~IAllocator();
00022         
00024 
00025 
00030         static const pword_t DefaultAlignment = sizeof(pword_t);
00032 
00034 
00035 
00039         static IAllocator& Default();
00040 
00047         static void SetDefault( IAllocator& aAllocator );
00048         
00052         static IAllocator& OperatorNewDelete();
00054         
00056 
00057 
00063         virtual ptr_t alloc( pword_t aSize , pword_t aAlignment = DefaultAlignment )=0;
00064 
00069         virtual void free( ptr_t aPtr )=0;
00071     };
00073 }
00074 //------------------------------------------------------------
00075 #endif
00076 // EOF
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義