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;
Exception class used when some impossible request was made of the system.
Definition: Exceptions.h:305
Helper class used to convert various data types to and from the format expected in Property strings.
Definition: ForwardRefs.h:84
Dummy base class to ensure correct casting of receivers.
Definition: Property.h:46
An abstract class that defines the interface to access object properties by name.
Definition: Property.h:62
virtual bool isReadable() const
Returns whether the property is readable.
String d_name
String that stores the Property name.
Definition: Property.h:244
Property(const String &name, const String &help, const String &defaultValue="", bool writesXML=true, const String &dataType="Unknown", const String &origin="Unknown")
Definition: Property.h:91
String d_origin
Holds origin of this property.
Definition: Property.h:251
virtual bool isWritable() const
Returns whether the property is writable.
String class used within the GUI system.
Definition: String.h:64
base class for properties able to do native set/get
Definition: TypedProperty.h:50
virtual void setNative(PropertyReceiver *receiver, typename Helper::pass_type value)
native set method, sets the property given a native type
Definition: TypedProperty.h:80
virtual Helper::safe_method_return_type getNative(const PropertyReceiver *receiver) const
native get method, returns the native type by copy
Definition: TypedProperty.h:92
virtual String get(const PropertyReceiver *receiver) const
Return the current value of the Property as a String.
Definition: TypedProperty.h:64
virtual void set(PropertyReceiver *receiver, const String &value)
Sets the value of the property.
Definition: TypedProperty.h:70
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1