29 #ifndef _CEGUIPropertySet_h_
30 #define _CEGUIPropertySet_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/String.h"
34 #include "CEGUI/IteratorBase.h"
35 #include "CEGUI/Property.h"
36 #include "CEGUI/PropertyHelper.h"
37 #include "CEGUI/TypedProperty.h"
40 #include "CEGUI/TplWindowProperty.h"
41 #include "CEGUI/Exceptions.h"
45 # pragma warning(push)
46 # pragma warning(disable : 4251)
86 void addProperty(
Property* property);
99 void removeProperty(
const String& name);
122 void clearProperties(
void);
135 bool isPropertyPresent(
const String& name)
const;
150 const String& getPropertyHelp(
const String& name)
const;
176 PropertyRegistry::const_iterator pos = d_properties.find(name);
178 if (pos == d_properties.end())
183 Property* baseProperty = pos->second;
214 void setProperty(
const String& name,
const String& value);
225 PropertyRegistry::iterator pos = d_properties.find(name);
227 if (pos == d_properties.end())
232 Property* baseProperty = pos->second;
258 bool isPropertyDefault(
const String& name)
const;
276 PropertyRegistry d_properties;
290 PropertyIterator getPropertyIterator(
void)
const;
305 #define CEGUI_DEFINE_PROPERTY(class_type, property_native_type, name, help, setter, getter, default_value)\
307 static ::CEGUI::TplWindowProperty<class_type, property_native_type> sProperty(\
308 name, help, propertyOrigin, setter, getter, default_value);\
310 this->addProperty(&sProperty);\
327 #define CEGUI_DEFINE_PROPERTY_NO_XML(class_type, property_native_type, name, help, setter, getter, default_value)\
329 static ::CEGUI::TplWindowProperty<class_type, property_native_type> sProperty(\
330 name, help, propertyOrigin, setter, getter, default_value, false);\
332 this->addProperty(&sProperty);\
337 #if defined(_MSC_VER)
338 # pragma warning(pop)
341 #endif // end of guard _CEGUIPropertySet_h_
Exception class used when a request was made for an unknown object.
Definition: Exceptions.h:240
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5579
virtual String get(const PropertyReceiver *receiver) const =0
Return the current value of the Property as a String.
void setProperty(const String &name, typename PropertyHelper< T >::pass_type value)
Sets the current value of a Property.
Definition: PropertySet.h:223
Class that contains a collection of Property objects.
Definition: PropertySet.h:56
base class for properties able to do native set/get
Definition: TypedProperty.h:49
virtual ~PropertySet(void)
Destructor for PropertySet objects.
Definition: PropertySet.h:70
virtual void setNative(PropertyReceiver *receiver, typename Helper::pass_type value)
native set method, sets the property given a native type
Definition: TypedProperty.h:80
PropertyHelper< T >::return_type getProperty(const String &name) const
Gets the current value of the specified Property.
Definition: PropertySet.h:174
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
PropertySet(void)
Constructs a new PropertySet object.
Definition: PropertySet.h:63
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: ForwardRefs.h:84
iterator class for maps
Definition: IteratorBase.h:196
An abstract class that defines the interface to access object properties by name. ...
Definition: Property.h:60
String class used within the GUI system.
Definition: String.h:62
virtual void set(PropertyReceiver *receiver, const String &value)=0
Sets the value of the property.