CClassManager.hpp

Go to the documentation of this file.
00001 #ifndef __CClassManager__
00002 #define __CClassManager__
00003 
00004 //  ===========================================================================
00005 
00009 #ifndef __CCLASSMANAGER_DEF__
00010 #define __CCLASSMANAGER_DEF__
00011 namespace Exponent { namespace IO { class CTextStream; } }
00012 namespace Exponent { namespace Basics { class CClass; } }
00013 namespace Exponent { namespace Collections { template<class TypeName> class TPointerCollection; } }
00014 namespace Exponent { namespace Collections { template<class TypeName> class TObjectNuller; } }
00015 using Exponent::Basics::CClass;
00016 using Exponent::IO::CTextStream;
00017 using Exponent::Collections::TPointerCollection;
00018 using Exponent::Collections::TObjectNuller;
00019 
00020 #ifndef WIN32
00021     #ifndef _cdecl
00022         #define _cdecl
00023     #endif
00024 #endif
00025 
00026 #endif __CCLASSMANAGER_DEF__
00027 
00028 // Uncomment the code below, or define it somewhere to turn on full logging
00029 //#define FULL_CLASS_LOGGING
00034 //  ===========================================================================
00035 namespace Exponent
00036 {
00037     namespace Basics
00038     {
00060         class CClassManager
00061         {
00062         public:
00063 
00064 //  ===========================================================================
00065 
00069             CClassManager();
00070 
00074             virtual ~CClassManager();
00075 
00080             void registerClass(CClass *theClass);
00081 
00087             bool isClassRegistered(const CClass &theClass) const;
00088 
00095             CClass *getClassWithName(const char *name);
00096 
00101             void logClassInformation(CTextStream *stream) const;
00102 
00106             void sortClasses();
00107 
00108 //  ===========================================================================
00109 
00110         protected:
00111 
00112 //  ===========================================================================
00113 
00115             typedef int (_cdecl classCompareFunction) (const CClass** obj1, const CClass** obj2);
00118 //  ===========================================================================
00119 
00120             TPointerCollection<CClass> *m_classes;      
00121             TObjectNuller<CClass> *m_classNuller;       
00122         };
00123     }
00124 }
00125 #endif      // End of CClassManager.hpp

Infinity API - CClassManager.hpp Source File generated on 7 Mar 2007