Crazy Eddie's GUI System
0.8.6
|
An abstract class that defines the interface to access object properties by name. More...
Inherits CEGUI::AllocatedObject< Property >.
Inherited by CEGUI::TypedProperty< T >, CEGUI::XercesParserProperties::SchemaDefaultResourceGroup, and CEGUI::TypedProperty< String >.
Public Member Functions | |
Property (const String &name, const String &help, const String &defaultValue="", bool writesXML=true, const String &dataType="Unknown", const String &origin="Unknown") | |
Creates a new Property object. More... | |
virtual | ~Property (void) |
Destructor for Property objects. | |
const String & | getHelp (void) const |
Return a String that describes the purpose and usage of this Property. More... | |
const String & | getName (void) const |
Return a the name of this Property. More... | |
const String & | getDataType (void) const |
Return string data type of this Property. More... | |
const String & | getOrigin (void) const |
Return string origin of this Property. More... | |
virtual String | get (const PropertyReceiver *receiver) const =0 |
Return the current value of the Property as a String. More... | |
virtual void | set (PropertyReceiver *receiver, const String &value)=0 |
Sets the value of the property. More... | |
virtual bool | isDefault (const PropertyReceiver *receiver) const |
Returns whether the property is at it's default value. More... | |
virtual String | getDefault (const PropertyReceiver *receiver) const |
Returns the default value of the Property as a String. More... | |
virtual void | writeXMLToStream (const PropertyReceiver *receiver, XMLSerializer &xml_stream) const |
Writes out an XML representation of this class to the given stream. More... | |
virtual bool | isReadable () const |
Returns whether the property is readable. More... | |
virtual bool | isWritable () const |
Returns whether the property is writable. More... | |
virtual bool | doesWriteXML () const |
Returns whether the property writes to XML streams. | |
virtual void | initialisePropertyReceiver (PropertyReceiver *) const |
function to allow initialisation of a PropertyReceiver. | |
virtual Property * | clone () const =0 |
Static Public Attributes | |
static const String | XMLElementName |
static const String | NameXMLAttributeName |
static const String | ValueXMLAttributeName |
Protected Attributes | |
String | d_name |
String that stores the Property name. | |
String | d_help |
String that stores the Property help text. | |
String | d_default |
String that stores the Property default value string. | |
bool | d_writeXML |
Specifies whether writeXMLToStream should do anything for this property. | |
String | d_dataType |
Holds data type of this property. | |
String | d_origin |
Holds origin of this property. | |
An abstract class that defines the interface to access object properties by name.
Property objects allow (via a PropertySet) access to certain properties of objects by using simple get/set functions and the name of the property to be accessed.
|
inline |
Creates a new Property object.
name | String containing the name of the new Property. |
help | String containing a description of the Property and it's usage. |
defaultValue | String holding the textual representation of the default value for this Property |
writesXML | Specifies whether the writeXMLToStream method should do anything for this Property. This enables selectivity in what properties within a PropertySet will get output as XML. |
dataType | String representation of the data type this property is held in ("int", "UVector2", ...) |
origin | String describing the origin class of this Property (Window, FrameWindow, ...) |
|
pure virtual |
Return the current value of the Property as a String.
receiver | Pointer to the target object. |
Implemented in CEGUI::TypedProperty< T >, CEGUI::TypedProperty< String >, and CEGUI::XercesParserProperties::SchemaDefaultResourceGroup.
Referenced by CEGUI::PropertySet::getProperty().
|
inline |
|
virtual |
|
inline |
|
inline |
|
inline |
|
virtual |
Returns whether the property is at it's default value.
receiver | Pointer to the target object. |
|
virtual |
Returns whether the property is readable.
Reimplemented in CEGUI::TplProperty< C, T >, and CEGUI::TplProperty< Window, String >.
Referenced by CEGUI::TypedProperty< String >::getNative().
|
virtual |
Returns whether the property is writable.
Reimplemented in CEGUI::TplProperty< C, T >, and CEGUI::TplProperty< Window, String >.
Referenced by CEGUI::TypedProperty< String >::setNative().
|
pure virtual |
Sets the value of the property.
receiver | Pointer to the target object. |
value | A String object that contains a textual representation of the new value to assign to the Property. |
InvalidRequestException | Thrown when the Property was unable to interpret the content of value. |
Implemented in CEGUI::TypedProperty< T >, CEGUI::TypedProperty< String >, and CEGUI::XercesParserProperties::SchemaDefaultResourceGroup.
Referenced by CEGUI::PropertySet::setProperty().
|
virtual |
Writes out an XML representation of this class to the given stream.
Reimplemented in CEGUI::Window::LookNFeelProperty, and CEGUI::Window::WindowRendererProperty.