31 #ifndef _CEGUITypedProperty_h_
32 #define _CEGUITypedProperty_h_
34 #include "CEGUI/Property.h"
35 #include "CEGUI/PropertyHelper.h"
36 #include "CEGUI/Exceptions.h"
56 TypedProperty(
const String& name,
const String& help,
const String& origin =
"Unknown",
typename Helper::pass_type defaultValue = T(),
bool writesXML =
true):
57 Property(name, help, Helper::toString(defaultValue), writesXML, Helper::getDataTypeName(), origin)
66 return Helper::toString(
getNative(receiver));
72 setNative(receiver, Helper::fromString(value));
83 setNative_impl(receiver,value);
94 return getNative_impl(receiver);
99 virtual void setNative_impl(
PropertyReceiver* receiver,
typename Helper::pass_type value) = 0;
100 virtual typename Helper::safe_method_return_type getNative_impl(
const PropertyReceiver* receiver)
const = 0;
105 #endif // end of guard _CEGUITypedProperty_h_
String d_origin
Holds origin of this property.
Definition: Property.h:251
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
String d_name
String that stores the Property name.
Definition: Property.h:244
base class for properties able to do native set/get
Definition: TypedProperty.h:49
virtual void set(PropertyReceiver *receiver, const String &value)
Sets the value of the property.
Definition: TypedProperty.h:70
virtual bool isWritable() const
Returns whether the property is writable.
virtual void setNative(PropertyReceiver *receiver, typename Helper::pass_type value)
native set method, sets the property given a native type
Definition: TypedProperty.h:80
Dummy base class to ensure correct casting of receivers.
Definition: Property.h:45
virtual Helper::safe_method_return_type getNative(const PropertyReceiver *receiver) const
native get method, returns the native type by copy
Definition: TypedProperty.h:92
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: ForwardRefs.h:84
virtual bool isReadable() const
Returns whether the property is readable.
Exception class used when some impossible request was made of the system.
Definition: Exceptions.h:304
An abstract class that defines the interface to access object properties by name. ...
Definition: Property.h:60
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.
Definition: Property.h:91
String class used within the GUI system.
Definition: String.h:62