IEntityPropertyHandler

C++
struct IEntityPropertyHandler {
  enum EPropertyType {
    Bool,
    Int,
    Float,
    Vector,
    String,
    Entity,
    FolderBegin,
    FolderEnd
  };
  enum EPropertyFlags {
    ePropertyFlag_UIEnum = BIT(0),
    ePropertyFlag_Unsorted = BIT(1)
  };
  struct SPropertyInfo {
    const char* name;
    EPropertyType type;
    const char* editType;
    const char* description;
    uint32 flags;
    struct SLimits {
      float min;
      float max;
    } limits;
  };
};
File

IEntityClass.h

Description

Custom interface that can be used to enumerate/set an entity class' property. Used for comunication with the editor, mostly.

See Also
IEntityPropertyHandler::EPropertyFlags Enumeration
C++
enum EPropertyFlags {
  ePropertyFlag_UIEnum = BIT(0),
  ePropertyFlag_Unsorted = BIT(1)
};
File

IEntityClass.h

IEntityPropertyHandler::EPropertyType Enumeration
C++
enum EPropertyType {
  Bool,
  Int,
  Float,
  Vector,
  String,
  Entity,
  FolderBegin,
  FolderEnd
};
File

IEntityClass.h

IEntityPropertyHandler::SPropertyInfo Structure
C++
struct SPropertyInfo {
  const char* name;
  EPropertyType type;
  const char* editType;
  const char* description;
  uint32 flags;
  struct SLimits {
    float min;
    float max;
  } limits;
};
File

IEntityClass.h

Members
Members
Description
const char* name;
Name of the property.
EPropertyType type;
Type of the property value.
const char* editType;
Type of edit control to use.
const char* description;
Description of the property.
uint32 flags;
Property flags.
IEntityPropertyHandler::SPropertyInfo::SLimits Structure
C++
struct SLimits {
  float min;
  float max;
};
File

IEntityClass.h

IEntityPropertyHandler::~IEntityPropertyHandler Destructor
C++
IEntityPropertyHandler::GetDefaultProperty Method
C++
virtual const char* GetDefaultProperty(int index) const = 0;
Parameters
Parameters
Description
int index
Index of the property to get, must be in 0 to GetPropertyCount()-1 range.
Description

Get a property in a entity of this class.

IEntityPropertyHandler::GetMemoryUsage Method
C++
virtual void GetMemoryUsage(ICrySizer * pSizer) const;
Description

Property info for entity class.

IEntityPropertyHandler::GetProperty Method
C++
virtual const char* GetProperty(IEntity* entity, int index) const = 0;
Parameters
Parameters
Description
int index
Index of the property to get, must be in 0 to GetPropertyCount()-1 range.
Description

Get a property in a entity of this class.

IEntityPropertyHandler::GetPropertyCount Method
C++
virtual int GetPropertyCount() const = 0;
Returns

Return Number of properties.

Description

Returns number of properties for this entity.

See Also
IEntityPropertyHandler::GetPropertyInfo Method
C++
virtual bool GetPropertyInfo(int index, SPropertyInfo& info) const = 0;
Parameters
Parameters
Description
nIndex
Index of the property to retrieve, must be in 0 to GetPropertyCount()-1 range.
Returns

Specified event description in SPropertyInfo structure.

Description

Retrieve information about properties of the entity.

See Also
IEntityPropertyHandler::GetScriptFlags Method
C++
virtual uint32 GetScriptFlags() const = 0;
Description

Get script flags of this class.

IEntityPropertyHandler::InitArchetypeEntity Method
C++
virtual void InitArchetypeEntity(IEntity* entity, const char* archetypeName, const SEntitySpawnParams& spawnParams) = 0;
Description

Init entity with archetype properties.

IEntityPropertyHandler::LoadArchetypeXMLProperties Method
C++
virtual void LoadArchetypeXMLProperties(const char* archetypeName, const XmlNodeRef& xml) = 0;
Description

Load archetype properties.

IEntityPropertyHandler::LoadEntityXMLProperties Method
C++
virtual void LoadEntityXMLProperties(IEntity* entity, const XmlNodeRef& xml) = 0;
Description

Load properties into the entity.

IEntityPropertyHandler::PropertiesChanged Method
C++
virtual void PropertiesChanged(IEntity* entity) = 0;
Description

Inform the implementation that properties have changed. Called at the end of a change block.

IEntityPropertyHandler::RefreshProperties Method
C++
virtual void RefreshProperties() = 0;
Description

Refresh the class' properties.

IEntityPropertyHandler::SetProperty Method
C++
virtual void SetProperty(IEntity* entity, int index, const char* value) = 0;
Parameters
Parameters
Description
int index
Index of the property to set, must be in 0 to GetPropertyCount()-1 range.
Description

Set a property in a entity of this class.