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)
222 PropertyRegistry::const_iterator pos = d_properties.find(name);
224 if (pos == d_properties.end())
229 Property* baseProperty = pos->second;
268 PropertyRegistry::iterator pos = d_properties.find(name);
270 if (pos == d_properties.end())
275 Property* baseProperty = pos->second;
319 PropertyRegistry d_properties;
352 #define CEGUI_DEFINE_PROPERTY(class_type, property_native_type, name, help, setter, getter, default_value)\
354 static ::CEGUI::TplWindowProperty<class_type, property_native_type> sProperty(\
355 name, help, propertyOrigin, setter, getter, default_value);\
357 this->addProperty(&sProperty);\
381 #define CEGUI_DEFINE_PROPERTY_NO_XML(class_type, property_native_type, name, help, setter, getter, default_value)\
383 static ::CEGUI::TplWindowProperty<class_type, property_native_type> sProperty(\
384 name, help, propertyOrigin, setter, getter, default_value, false);\
386 this->addProperty(&sProperty);\
391 #if defined(_MSC_VER)
392 # pragma warning(pop)
iterator class for maps
Definition: IteratorBase.h:197
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
Interface providing introspection capabilities.
Definition: PropertySet.h:108
PropertySet(void)
Constructs a new PropertySet object.
Definition: PropertySet.h:114
Property * getPropertyInstance(const String &name) const
Retrieves a property instance (that was previously added)
void removeProperty(const String &name)
Removes a Property from the PropertySet.
PropertyHelper< T >::return_type getProperty(const String &name) const
Gets the current value of the specified Property.
Definition: PropertySet.h:220
PropertyIterator getPropertyIterator(void) const
Return a PropertySet::PropertyIterator object to iterate over the available Properties.
void setProperty(const String &name, typename PropertyHelper< T >::pass_type value)
Sets the current value of a Property.
Definition: PropertySet.h:266
String getPropertyDefault(const String &name) const
Returns the default value of a Property as a String.
void addProperty(Property *property)
bool isPropertyDefault(const String &name) const
Returns whether a Property is at it's default value.
virtual ~PropertySet(void)
Destructor for PropertySet objects.
Definition: PropertySet.h:121
void clearProperties(void)
Removes all Property objects from the PropertySet.
bool isPropertyPresent(const String &name) const
Checks to see if a Property with the given name is in the PropertySet.
const String & getPropertyHelp(const String &name) const
Return the help text for the specified Property.
String getProperty(const String &name) const
Gets the current value of the specified Property.
void setProperty(const String &name, const String &value)
Sets the current value of a Property.
An abstract class that defines the interface to access object properties by name.
Definition: Property.h:62
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.
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
Exception class used when a request was made for an unknown object.
Definition: Exceptions.h:247
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5580