00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _ABSTRACTCOMPONENT_
00019 #define _ABSTRACTCOMPONENT_
00020
00021 #include "contrib/xercesc/dom/DOM.hpp"
00022
00023 #include "util/AbstractStreamedObject.h"
00024
00025 class Attribute;
00026 class GameEntity;
00027
00028 typedef std::string ComponentId;
00029
00036 class AbstractComponent : public AbstractStreamedObject
00037 {
00038 public:
00042 virtual ~AbstractComponent() { }
00043
00049 virtual void Update(const int nDelta) = 0;
00050
00056 virtual void Attach(GameEntity* pEntity) = 0;
00057
00062 virtual void Detach() = 0;
00063
00070 virtual bool FromAttribute(const Attribute* pRoot) = 0;
00071
00077 virtual const ComponentId & GetComponentName() const = 0;
00078
00086 virtual const ComponentId & GetFamilyName() const = 0;
00087 };
00088
00089 #endif