00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef CAELUM__CAELUM_PLUGIN_H
00022 #define CAELUM__CAELUM_PLUGIN_H
00023
00024 #include "CaelumPrerequisites.h"
00025 #include "CaelumScriptTranslator.h"
00026 #include "TypeDescriptor.h"
00027 #include "OgrePlugin.h"
00028
00029 namespace Caelum
00030 {
00037 class CAELUM_EXPORT CaelumPlugin: public Ogre::Singleton<CaelumPlugin>, public Ogre::Plugin
00038 {
00039 public:
00041 static CaelumPlugin& getSingleton(void);
00043 static CaelumPlugin* getSingletonPtr(void);
00044
00045 CaelumPlugin();
00046 ~CaelumPlugin();
00047
00048 virtual void install ();
00049 virtual void initialise ();
00050 virtual void shutdown ();
00051 virtual void uninstall ();
00052
00053 static const Ogre::String CAELUM_PLUGIN_NAME;
00054 virtual const String& getName () const;
00055
00056
00057 inline bool isInstalled () const { return mIsInstalled; }
00058
00059 private:
00060 bool mIsInstalled;
00061
00062 #if CAELUM_TYPE_DESCRIPTORS
00063 public:
00065 CaelumDefaultTypeDescriptorData* getTypeDescriptorData () { return &mTypeDescriptorData; }
00066
00067 private:
00068 CaelumDefaultTypeDescriptorData mTypeDescriptorData;
00069 #endif
00070
00071 #if CAELUM_SCRIPT_SUPPORT
00072 public:
00080 void loadCaelumSystemFromScript (
00081 CaelumSystem* sys,
00082 const Ogre::String& objectName,
00083 const Ogre::String& scriptFileGroup = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME
00084 );
00085
00087 PropScriptResourceManager* getPropScriptResourceManager () { return &mPropScriptResourceManager; }
00088 CaelumScriptTranslatorManager* getScriptTranslatorManager () { return &mScriptTranslatorManager; }
00089
00090 private:
00091 PropScriptResourceManager mPropScriptResourceManager;
00092 CaelumScriptTranslatorManager mScriptTranslatorManager;
00093 #endif
00094 };
00095 }
00096
00097 #endif // CAELUM__CAELUM_PLUGIN_H