CrystalSpace

Public API Reference

CS::Utility::iModifiableDescription Struct Reference

The description of an CS::Utility::iModifiable object. More...

#include <iutil/modifiable.h>

Inheritance diagram for CS::Utility::iModifiableDescription:

List of all members.

Public Member Functions

virtual size_t FindParameter (csStringID id) const =0
 Find the index of a parameter based on its ID.
virtual iModifiableDescriptionGetChild (size_t index) const =0
 Get the child description with the given index.
virtual size_t GetChildrenCount () const =0
 Get the count of child descriptions.
virtual const char * GetLabel () const =0
 Get the label of this modifiable.
virtual const char * GetName () const =0
 Get the name of this modifiable.
virtual iModifiableParameterGetParameter (size_t index) const =0
 Get a parameter based on its index.
virtual iModifiableParameterGetParameter (csStringID id) const =0
 Get a parameter based on its ID.
virtual size_t GetParameterCount () const =0
 Get the number of editable parameters of this description.
virtual iStringArrayGetResources () const =0
 Get the list of resource entries of this description.
virtual size_t GetTotalParameterCount () const =0
 Get the total number of editable parameters of this description, that is including the parameters of all children and grand-children.

Detailed Description

The description of an CS::Utility::iModifiable object.

It contains all the information needed in order to expose and access the properties of a iModifiable.

It can be used fo an automated access to an object, eg in order to generate a graphical user interface (see the CSEditing library), to animate it over time, or to save and load it.

A iModifiableDescription is created through iModifiable::GetDescription() if a user application would like to access the object without knowing its external interface. The iModifiableDescription will then allow to know how the object can be accessed or represented in a graphical user environment.

A iModifiableDescription can be structured hierachically (see GetChild() and GetChildrenCount()) in order to gather logical subsets of parameters.

See also:
BaseModifiableDescription for a default implementation

Definition at line 100 of file modifiable.h.


Member Function Documentation

virtual size_t CS::Utility::iModifiableDescription::FindParameter ( csStringID  id  )  const [pure virtual]

Find the index of a parameter based on its ID.

Returns:
The index of the parameter, or (size_t) ~0 if it was not found.
virtual iModifiableDescription* CS::Utility::iModifiableDescription::GetChild ( size_t  index  )  const [pure virtual]

Get the child description with the given index.

virtual size_t CS::Utility::iModifiableDescription::GetChildrenCount (  )  const [pure virtual]

Get the count of child descriptions.

Child descriptions forms a hierarchical structure of sets of parameters.

virtual const char* CS::Utility::iModifiableDescription::GetLabel (  )  const [pure virtual]

Get the label of this modifiable.

A label identifies (supposedly uniquely) the description of the modifiable.

virtual const char* CS::Utility::iModifiableDescription::GetName (  )  const [pure virtual]

Get the name of this modifiable.

Note:
You might want to process this string by the translator.
virtual iModifiableParameter* CS::Utility::iModifiableDescription::GetParameter ( size_t  index  )  const [pure virtual]

Get a parameter based on its index.

virtual iModifiableParameter* CS::Utility::iModifiableDescription::GetParameter ( csStringID  id  )  const [pure virtual]

Get a parameter based on its ID.

virtual size_t CS::Utility::iModifiableDescription::GetParameterCount (  )  const [pure virtual]

Get the number of editable parameters of this description.

This won't include the parameters of the child descriptions.

See also:
GetTotalParameterCount(), GetChild()
virtual iStringArray* CS::Utility::iModifiableDescription::GetResources (  )  const [pure virtual]

Get the list of resource entries of this description.

Each entry is a path containing additional data such as the translation files of this description.

virtual size_t CS::Utility::iModifiableDescription::GetTotalParameterCount (  )  const [pure virtual]

Get the total number of editable parameters of this description, that is including the parameters of all children and grand-children.

See also:
GetParameterCount(), GetChild()

The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.1 by doxygen 1.6.1