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) 107 class CEGUIEXPORT PropertySet :
public PropertyReceiver
138 void addProperty(
Property* property);
148 void removeProperty(
const String& name);
168 void clearProperties(
void);
181 bool isPropertyPresent(
const String& name)
const;
196 const String& getPropertyHelp(
const String& name)
const;
222 PropertyRegistry::const_iterator pos = d_properties.find(name);
224 if (pos == d_properties.end())
229 Property* baseProperty = pos->second;
257 void setProperty(
const String& name,
const String& value);
268 PropertyRegistry::iterator pos = d_properties.find(name);
270 if (pos == d_properties.end())
275 Property* baseProperty = pos->second;
301 bool isPropertyDefault(
const String& name)
const;
318 CEGUI_MAP_ALLOC(String, Property*)> PropertyRegistry;
319 PropertyRegistry d_properties;
333 PropertyIterator getPropertyIterator(
void)
const;
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) 395 #endif // end of guard _CEGUIPropertySet_h_ Exception class used when a request was made for an unknown object.
Definition: cegui/include/CEGUI/Exceptions.h:246
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: cegui/include/CEGUI/String.h:5579
virtual String get(const PropertyReceiver *receiver) const =0
Return the current value of the Property as a String.
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
void setProperty(const String &name, typename PropertyHelper< T >::pass_type value)
Sets the current value of a Property.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/PropertySet.h:266
base class for properties able to do native set/get
Definition: cegui/include/CEGUI/TypedProperty.h:49
virtual ~PropertySet(void)
Destructor for PropertySet objects.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/PropertySet.h:121
virtual void setNative(PropertyReceiver *receiver, typename Helper::pass_type value)
native set method, sets the property given a native type
Definition: cegui/include/CEGUI/TypedProperty.h:80
PropertyHelper< T >::return_type getProperty(const String &name) const
Gets the current value of the specified Property.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/PropertySet.h:220
virtual Helper::safe_method_return_type getNative(const PropertyReceiver *receiver) const
native get method, returns the native type by copy
Definition: cegui/include/CEGUI/TypedProperty.h:92
PropertySet(void)
Constructs a new PropertySet object.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/PropertySet.h:114
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: cegui/include/CEGUI/ForwardRefs.h:84
iterator class for maps
Definition: cegui/include/CEGUI/IteratorBase.h:196
An abstract class that defines the interface to access object properties by name. ...
Definition: cegui/include/CEGUI/Property.h:60
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62
virtual void set(PropertyReceiver *receiver, const String &value)=0
Sets the value of the property.