Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/engine/Object.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _OBJECT_H_
00004 #define _OBJECT_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <engine/ObjectDefines.h>
00009 #include <core/Singleton.h>
00010 
00011 #include <string>
00012 #include <map>
00013 
00014 namespace engine
00015 {
00016 
00017 class ENGINE_PUBLIC_EXPORT Object
00018 {
00019 public:
00020 
00021         Object();
00022         Object(const std::string& name);
00023 
00024         ~Object();
00025 
00027         const u32& getID() const;
00028 
00030         const ObjectType& getObjectType() const;
00031 
00032         void setName(const std::string& name);
00033         const std::string& getName() const;
00034 
00036         void initialize();
00037 
00039         void uninitialize();
00040 
00041         void update(f32 elapsedTime);
00042 
00044         bool isInitialized() const;
00045 
00047         void addDependency(Object* object);
00048 
00049         void removeDependency(Object* object);
00050 
00051         void removeAllDependencies();
00052 
00053 protected:
00054 
00055         u32 mID;
00056 
00057         bool mChangeableName;
00058         std::string mName;
00059 
00060         ObjectType mObjectType;
00061 
00063         static u32 msNextGeneratedObjectIndex;
00064 
00065         static u32 mIndexCounter;
00066 
00067         virtual void initializeImpl();
00068         virtual void uninitializeImpl();
00069         virtual void updateImpl(f32 elapsedTime);
00070 
00071         bool mIsInitialized;
00072 
00073         std::map<u32, Object*> mDependencyObjects;
00074 };
00075 
00076 } // end namespace engine
00077 
00078 #endif

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by Doxygen (1.7.4)