27 lines
811 B
C++
27 lines
811 B
C++
#ifndef IPropertyHolder_h__
|
|||
|
|
#define IPropertyHolder_h__
|
||
|
|
|
||
|
|
#include <vector>
|
||
|
|
#include "IProperty.h"
|
||
|
|
#include "ISerializable.h"
|
||
|
|
|
||
|
|
typedef std::vector<LifeCore::IProperty*> PropertyCollection;
|
||
|
|
typedef std::vector<LifeCore::IProperty*>::iterator PropertyCollectionItr;
|
||
|
|
|
||
|
|
namespace LifeCore
|
||
|
|
{
|
||
|
|
class IPropertyHolder : public ISerializable
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
bool Serialize(LifeCore::IMemoryStream* stm);
|
||
|
|
bool Deserialize(LifeCore::IMemoryStream* stm);
|
||
|
|
PropertyCollection* GetProperties();
|
||
|
|
void RegisterProperty(IProperty* property);
|
||
|
|
void UnregisterProperty(IProperty* property);
|
||
|
|
bool GetPropertyByAttribute(const String& name, IProperty** prop);
|
||
|
|
bool GetPropertyByAttribute(const String& name, const String& value, IProperty** prop);
|
||
|
|
private:
|
||
|
|
PropertyCollection properties;
|
||
|
|
};
|
||
|
|
}
|
||
|
|
#endif // IPropertyHolder_h__
|