Crazy Eddie's GUI System  0.8.4
CEGUI::TypedProperty< T > Class Template Reference

base class for properties able to do native set/get More...

+ Inheritance diagram for CEGUI::TypedProperty< T >:
+ Collaboration diagram for CEGUI::TypedProperty< T >:

List of all members.

Public Types

typedef PropertyHelper< T > Helper

Public Member Functions

 TypedProperty (const String &name, const String &help, const String &origin="Unknown", typename Helper::pass_type defaultValue=T(), bool writesXML=true)
virtual String get (const PropertyReceiver *receiver) const
virtual void set (PropertyReceiver *receiver, const String &value)
virtual void setNative (PropertyReceiver *receiver, typename Helper::pass_type value)
 native set method, sets the property given a native type
virtual
Helper::safe_method_return_type 
getNative (const PropertyReceiver *receiver) const
 native get method, returns the native type by copy

Protected Member Functions

virtual void setNative_impl (PropertyReceiver *receiver, typename Helper::pass_type value)=0
virtual
Helper::safe_method_return_type 
getNative_impl (const PropertyReceiver *receiver) const =0

Detailed Description

template<typename T>
class CEGUI::TypedProperty< T >

base class for properties able to do native set/get

Todo:
I split this from CEGUIProperty.h to avoid bloating it with PropertyHelper, I also split it from TplProperty since it can be used outside of that. Is that the "right thing" to do?

Member Function Documentation

template<typename T>
virtual String CEGUI::TypedProperty< T >::get ( const PropertyReceiver receiver) const [inline, virtual]

Return the current value of the Property as a String.

Parameters:
receiverPointer to the target object.
Returns:
String object containing a textual representation of the current value of the Property

Implements CEGUI::Property.

template<typename T>
virtual Helper::safe_method_return_type CEGUI::TypedProperty< T >::getNative ( const PropertyReceiver receiver) const [inline, virtual]

native get method, returns the native type by copy

See also:
Property::get

Referenced by CEGUI::TypedProperty< String >::get(), and CEGUI::PropertySet::getProperty().

template<typename T>
virtual void CEGUI::TypedProperty< T >::set ( PropertyReceiver receiver,
const String value 
) [inline, virtual]

Sets the value of the property.

Parameters:
receiverPointer to the target object.
valueA String object that contains a textual representation of the new value to assign to the Property.
Returns:
Nothing.
Exceptions:
InvalidRequestExceptionThrown when the Property was unable to interpret the content of value.

Implements CEGUI::Property.

template<typename T>
virtual void CEGUI::TypedProperty< T >::setNative ( PropertyReceiver receiver,
typename Helper::pass_type  value 
) [inline, virtual]

native set method, sets the property given a native type

See also:
Property::set

Referenced by CEGUI::TypedProperty< String >::set(), and CEGUI::PropertySet::setProperty().

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends