|
Crazy Eddie's GUI System
0.8.4
|
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 >.
Collaboration diagram for CEGUI::Property: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. | |
| virtual | ~Property (void) |
| Destructor for Property objects. | |
| const String & | getHelp (void) const |
| Return a String that describes the purpose and usage of this Property. | |
| const String & | getName (void) const |
| Return a the name of this Property. | |
| const String & | getDataType (void) const |
| Return string data type of this Property. | |
| const String & | getOrigin (void) const |
| Return string origin of this Property. | |
| virtual String | get (const PropertyReceiver *receiver) const =0 |
| Return the current value of the Property as a String. | |
| virtual void | set (PropertyReceiver *receiver, const String &value)=0 |
| Sets the value of the property. | |
| virtual bool | isDefault (const PropertyReceiver *receiver) const |
| Returns whether the property is at it's default value. | |
| virtual String | getDefault (const PropertyReceiver *receiver) const |
| Returns the default value of the Property as a String. | |
| virtual void | writeXMLToStream (const PropertyReceiver *receiver, XMLSerializer &xml_stream) const |
| Writes out an XML representation of this class to the given stream. | |
| virtual bool | isReadable () const |
| Returns whether the property is readable. | |
| virtual bool | isWritable () const |
| Returns whether the property is writable. | |
| 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.
| CEGUI::Property::Property | ( | const String & | name, |
| const String & | help, | ||
| const String & | defaultValue = "", |
||
| bool | writesXML = true, |
||
| const String & | dataType = "Unknown", |
||
| const String & | origin = "Unknown" |
||
| ) | [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, ...) |
| virtual String CEGUI::Property::get | ( | const PropertyReceiver * | receiver | ) | const [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().
| const String& CEGUI::Property::getDataType | ( | void | ) | const [inline] |
| virtual String CEGUI::Property::getDefault | ( | const PropertyReceiver * | receiver | ) | const [virtual] |
| const String& CEGUI::Property::getHelp | ( | void | ) | const [inline] |
| const String& CEGUI::Property::getName | ( | void | ) | const [inline] |
| const String& CEGUI::Property::getOrigin | ( | void | ) | const [inline] |
| virtual bool CEGUI::Property::isDefault | ( | const PropertyReceiver * | receiver | ) | const [virtual] |
Returns whether the property is at it's default value.
| receiver | Pointer to the target object. |
| virtual bool CEGUI::Property::isReadable | ( | ) | const [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 bool CEGUI::Property::isWritable | ( | ) | const [virtual] |
Returns whether the property is writable.
Reimplemented in CEGUI::TplProperty< C, T >, and CEGUI::TplProperty< Window, String >.
Referenced by CEGUI::TypedProperty< String >::setNative().
| virtual void CEGUI::Property::set | ( | PropertyReceiver * | receiver, |
| const String & | value | ||
| ) | [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 void CEGUI::Property::writeXMLToStream | ( | const PropertyReceiver * | receiver, |
| XMLSerializer & | xml_stream | ||
| ) | const [virtual] |
Writes out an XML representation of this class to the given stream.
Reimplemented in CEGUI::Window::LookNFeelProperty, and CEGUI::Window::WindowRendererProperty.