OpenWalnut
1.4.0
|
Class to manage properties of an object and to provide convenience methods for easy access and manipulation. More...
#include <WPropertyGroup.h>
Public Types | |
typedef boost::shared_ptr < WPropertyGroup > | SPtr |
shared pointer to object of this type | |
typedef boost::shared_ptr < const WPropertyGroup > | ConstSPtr |
const shared pointer to object of this type | |
typedef WPropertyGroup * | Ptr |
pointer to object of this type | |
typedef const WPropertyGroup * | ConstPtr |
const pointer to object of this type | |
typedef WPropertyGroup & | Ref |
ref to object of this type | |
typedef const WPropertyGroup & | ConstRef |
const ref to object of this type | |
typedef WPropertyGroupBase::PropertyContainerType | PropertyContainerType |
For shortening: a type defining a shared vector of WSubject pointers. | |
typedef WPropertyGroupBase::PropertySharedContainerType | PropertySharedContainerType |
The alias for a shared container. | |
typedef WPropertyGroupBase::PropertyConstIterator | PropertyConstIterator |
The const iterator type of the container. | |
typedef WPropertyGroupBase::PropertyIterator | PropertyIterator |
The iterator type of the container. | |
Public Member Functions | |
WPropertyGroup (std::string name="unnamed group", std::string description="an unnamed group of properties") | |
Constructor. | |
WPropertyGroup (const WPropertyGroup &from) | |
Copy constructor. | |
virtual | ~WPropertyGroup () |
destructor | |
virtual boost::shared_ptr < WPropertyBase > | clone () |
This method clones a property and returns the clone. | |
virtual PROPERTY_TYPE | getType () const |
Gets the real type of this instance. | |
virtual bool | setAsString (std::string value) |
This methods allows properties to be set by a string value. | |
virtual std::string | getAsString () |
Returns the current value as a string. | |
virtual bool | set (boost::shared_ptr< WPropertyBase > value, bool recommendedOnly=false) |
Sets the value from the specified property to this one. | |
virtual bool | set (boost::shared_ptr< WPropertyGroup > value, std::vector< std::string > exclude=std::vector< std::string >(), bool recommendedOnly=false) |
This method is a special version of WPropertyBase::set for groups. | |
virtual void | clear () |
Removes all properties from the list. | |
template<typename PropType > | |
PropType | addProperty (PropType prop) |
Insert the specified property into the list. | |
void | removeProperty (boost::shared_ptr< WPropertyBase > prop) |
Remove the specified property from the list. | |
WPropGroup | addPropertyGroup (std::string name, std::string description, bool hide=false) |
Create and add a new property group. | |
template<typename T > | |
boost::shared_ptr < WPropertyVariable< T > > | addProperty (std::string name, std::string description, const T &initial, bool hide=false) |
Create and add a new property of the template type. | |
template<typename T > | |
boost::shared_ptr < WPropertyVariable< T > > | addProperty (std::string name, std::string description, const T &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
template<typename T > | |
boost::shared_ptr < WPropertyVariable< T > > | addProperty (std::string name, std::string description, const T &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
template<typename T > | |
boost::shared_ptr < WPropertyVariable< T > > | addProperty (std::string name, std::string description, const T &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropBool | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_BOOL &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropInt | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_INT &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropDouble | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropString | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_STRING &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropFilename | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_PATH &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropSelection | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_SELECTION &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropPosition | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_POSITION &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropColor | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_COLOR &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropTrigger | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER &initial, bool hide=false) |
Create and add a new property of the template type. | |
WPropBool | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_BOOL &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropInt | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_INT &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropDouble | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropString | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_STRING &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropFilename | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_PATH &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropSelection | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_SELECTION &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropPosition | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_POSITION &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropColor | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_COLOR &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropTrigger | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER &initial, boost::shared_ptr< WCondition > condition, bool hide=false) |
Create and add a new property of the template type. | |
WPropBool | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_BOOL &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropInt | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_INT &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropDouble | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropString | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_STRING &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropFilename | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_PATH &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropSelection | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_SELECTION &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropPosition | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_POSITION &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropColor | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_COLOR &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropTrigger | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER &initial, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropBool | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_BOOL &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropInt | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_INT &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropDouble | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropString | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_STRING &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropFilename | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_PATH &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropSelection | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_SELECTION &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropPosition | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_POSITION &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropColor | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_COLOR &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
WPropTrigger | addProperty (std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER &initial, boost::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false) |
Create and add a new property of the template type. | |
Protected Member Functions | |
virtual bool | setImpl (boost::shared_ptr< WPropertyGroup > value, std::string path="", std::vector< std::string > exclude=std::vector< std::string >(), bool recommendedOnly=false) |
This function implements the set functionality. | |
Friends | |
class | WPropertiesTest |
Class to manage properties of an object and to provide convenience methods for easy access and manipulation.
It also allows thread safe iteration on its elements. The main purpose of this class is to group properties together and to allow searching properties by a given name. The name of each property in a group has to be unique and is constructed using the group names containing them: hello/you/property is the property with the name "property" in the group "you" which against is in the group "hello".
Definition at line 49 of file WPropertyGroup.h.
typedef const WPropertyGroup* WPropertyGroup::ConstPtr |
const pointer to object of this type
Definition at line 57 of file WPropertyGroup.h.
typedef const WPropertyGroup& WPropertyGroup::ConstRef |
const ref to object of this type
Definition at line 59 of file WPropertyGroup.h.
typedef boost::shared_ptr< const WPropertyGroup > WPropertyGroup::ConstSPtr |
const shared pointer to object of this type
Reimplemented from WPropertyGroupBase.
Definition at line 55 of file WPropertyGroup.h.
The const iterator type of the container.
Reimplemented from WPropertyGroupBase.
Definition at line 74 of file WPropertyGroup.h.
For shortening: a type defining a shared vector of WSubject pointers.
Reimplemented from WPropertyGroupBase.
Definition at line 64 of file WPropertyGroup.h.
The iterator type of the container.
Reimplemented from WPropertyGroupBase.
Definition at line 79 of file WPropertyGroup.h.
The alias for a shared container.
Reimplemented from WPropertyGroupBase.
Definition at line 69 of file WPropertyGroup.h.
typedef WPropertyGroup* WPropertyGroup::Ptr |
pointer to object of this type
Definition at line 56 of file WPropertyGroup.h.
typedef WPropertyGroup& WPropertyGroup::Ref |
ref to object of this type
Definition at line 58 of file WPropertyGroup.h.
typedef boost::shared_ptr< WPropertyGroup > WPropertyGroup::SPtr |
shared pointer to object of this type
Reimplemented from WPropertyGroupBase.
Definition at line 54 of file WPropertyGroup.h.
WPropertyGroup::WPropertyGroup | ( | std::string | name = "unnamed group" , |
std::string | description = "an unnamed group of properties" |
||
) |
Constructor.
Creates an empty list of properties.
name | the name of the property group. The GUI is using this name for naming the tabs/group boxes |
description | the description of the group. |
Definition at line 40 of file WPropertyGroup.cpp.
Referenced by addPropertyGroup(), and clone().
WPropertyGroup::WPropertyGroup | ( | const WPropertyGroup & | from | ) | [explicit] |
Copy constructor.
Creates a deep copy of this property. As boost::signals2 and condition variables are non-copyable, new instances get created. The subscriptions to a signal are LOST as well as all listeners to a condition. The conditions you can grab using getValueChangeConditon and getCondition are not the same as in the original! This is because the class corresponds to the observer/observable pattern. You won't expect a clone to fire a condition if a original flag is changed (which after cloning is completely decoupled from the clone).
from | the instance to copy. |
Definition at line 51 of file WPropertyGroup.cpp.
WPropertyGroup::~WPropertyGroup | ( | ) | [virtual] |
destructor
Definition at line 46 of file WPropertyGroup.cpp.
PropType WPropertyGroup::addProperty | ( | PropType | prop | ) |
Insert the specified property into the list.
prop | the property to add |
Definition at line 924 of file WPropertyGroup.h.
References WPropertyGroupBase::addArbitraryProperty().
Referenced by addProperty(), and addPropertyGroup().
boost::shared_ptr< WPropertyVariable< T > > WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const T & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 931 of file WPropertyGroup.h.
References addProperty().
boost::shared_ptr< WPropertyVariable< T > > WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const T & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 942 of file WPropertyGroup.h.
References addProperty().
boost::shared_ptr< WPropertyVariable< T > > WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const T & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 954 of file WPropertyGroup.h.
References addProperty().
boost::shared_ptr< WPropertyVariable< T > > WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const T & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 966 of file WPropertyGroup.h.
References addProperty().
WPropBool WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_BOOL & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 252 of file WPropertyGroup.cpp.
WPropInt WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_INT & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 257 of file WPropertyGroup.cpp.
WPropDouble WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_DOUBLE & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 262 of file WPropertyGroup.cpp.
WPropString WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_STRING & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 267 of file WPropertyGroup.cpp.
WPropFilename WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_PATH & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 272 of file WPropertyGroup.cpp.
WPropSelection WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_SELECTION & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 277 of file WPropertyGroup.cpp.
WPropPosition WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_POSITION & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 282 of file WPropertyGroup.cpp.
WPropColor WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_COLOR & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 287 of file WPropertyGroup.cpp.
WPropTrigger WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_TRIGGER & | initial, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
hide | set to true to set the hide flag directly. |
Definition at line 292 of file WPropertyGroup.cpp.
WPropBool WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_BOOL & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 304 of file WPropertyGroup.cpp.
WPropInt WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_INT & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 310 of file WPropertyGroup.cpp.
WPropDouble WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_DOUBLE & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 316 of file WPropertyGroup.cpp.
WPropString WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_STRING & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 322 of file WPropertyGroup.cpp.
WPropFilename WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_PATH & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 328 of file WPropertyGroup.cpp.
WPropSelection WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_SELECTION & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 334 of file WPropertyGroup.cpp.
WPropPosition WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_POSITION & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 340 of file WPropertyGroup.cpp.
WPropColor WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_COLOR & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 346 of file WPropertyGroup.cpp.
WPropTrigger WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_TRIGGER & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
condition | use this external condition for notification. |
hide | set to true to set the hide flag directly. |
Definition at line 352 of file WPropertyGroup.cpp.
WPropBool WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_BOOL & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 365 of file WPropertyGroup.cpp.
WPropInt WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_INT & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 371 of file WPropertyGroup.cpp.
WPropDouble WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_DOUBLE & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 377 of file WPropertyGroup.cpp.
WPropString WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_STRING & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 383 of file WPropertyGroup.cpp.
WPropFilename WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_PATH & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 389 of file WPropertyGroup.cpp.
WPropSelection WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_SELECTION & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 395 of file WPropertyGroup.cpp.
WPropPosition WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_POSITION & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 401 of file WPropertyGroup.cpp.
WPropColor WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_COLOR & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 407 of file WPropertyGroup.cpp.
WPropTrigger WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_TRIGGER & | initial, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
hide | set to true to set the hide flag directly. |
Definition at line 413 of file WPropertyGroup.cpp.
WPropBool WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_BOOL & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 427 of file WPropertyGroup.cpp.
WPropInt WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_INT & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 434 of file WPropertyGroup.cpp.
WPropDouble WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_DOUBLE & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable. It also sets the min and max constraint to [0,100].
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 441 of file WPropertyGroup.cpp.
WPropString WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_STRING & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 448 of file WPropertyGroup.cpp.
WPropFilename WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_PATH & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 455 of file WPropertyGroup.cpp.
WPropSelection WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_SELECTION & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 462 of file WPropertyGroup.cpp.
WPropPosition WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_POSITION & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 469 of file WPropertyGroup.cpp.
WPropColor WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_COLOR & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 476 of file WPropertyGroup.cpp.
WPropTrigger WPropertyGroup::addProperty | ( | std::string | name, |
std::string | description, | ||
const WPVBaseTypes::PV_TRIGGER & | initial, | ||
boost::shared_ptr< WCondition > | condition, | ||
WPropertyBase::PropertyChangeNotifierType | notifier, | ||
bool | hide = false |
||
) |
Create and add a new property of the template type.
For more details see appropriate constructor ow WPropertyVariable.
name | the property name |
description | the property description |
initial | the initial value |
notifier | use this notifier for change callbacks. |
condition | use this external condition for notification |
hide | set to true to set the hide flag directly. |
Definition at line 483 of file WPropertyGroup.cpp.
WPropGroup WPropertyGroup::addPropertyGroup | ( | std::string | name, |
std::string | description, | ||
bool | hide = false |
||
) |
Create and add a new property group.
Use these groups to structure your properties.
name | the name of the group. |
description | the description of the group. |
hide | true if group should be completely hidden. |
Definition at line 231 of file WPropertyGroup.cpp.
References addProperty(), and WPropertyGroup().
void WPropertyGroup::clear | ( | ) | [virtual] |
Removes all properties from the list.
Definition at line 239 of file WPropertyGroup.cpp.
References WSharedObject< T >::getWriteTicket(), and WPropertyGroupBase::m_properties.
boost::shared_ptr< WPropertyBase > WPropertyGroup::clone | ( | ) | [virtual] |
This method clones a property and returns the clone.
It does a deep copy and, in contrast to a copy constructor, creates property with the correct type without explicitly requiring the user to specify it. It creates a NEW change condition and change signal. This means, alls subscribed signal handlers are NOT copied.
Implements WPropertyBase.
Definition at line 57 of file WPropertyGroup.cpp.
References WPropertyGroup().
std::string WPropertyGroup::getAsString | ( | ) | [virtual] |
Returns the current value as a string.
This is useful for debugging or project files. It is not implemented as << operator, since the << should also print min/max constraints and so on. This simply is the value.
Implements WPropertyBase.
Definition at line 74 of file WPropertyGroup.cpp.
PROPERTY_TYPE WPropertyGroup::getType | ( | ) | const [virtual] |
Gets the real type of this instance.
In this case, PV_GROUP.
Reimplemented from WPropertyBase.
Definition at line 63 of file WPropertyGroup.cpp.
void WPropertyGroup::removeProperty | ( | boost::shared_ptr< WPropertyBase > | prop | ) |
Remove the specified property from the list.
If the given property is not in the list, nothing happens.
prop | the property to remove. |
Definition at line 218 of file WPropertyGroup.cpp.
References WSharedObject< T >::getWriteTicket(), WPropertyGroupBase::m_properties, and WPropertyBase::m_updateCondition.
bool WPropertyGroup::set | ( | boost::shared_ptr< WPropertyBase > | value, |
bool | recommendedOnly = false |
||
) | [virtual] |
Sets the value from the specified property to this one.
This is especially useful to copy a value without explicitly casting/knowing the dynamic type of the property. For WPropertyGroup, this tries to set the contained properties to the value of the given group. It does not add/remove properties. It simply sets the children values to the ones given.
value | the new value. |
recommendedOnly | if true, property types which support recommended values apply the given value as recommendation. |
Implements WPropertyBase.
Definition at line 145 of file WPropertyGroup.cpp.
bool WPropertyGroup::set | ( | boost::shared_ptr< WPropertyGroup > | value, |
std::vector< std::string > | exclude = std::vector< std::string >() , |
||
bool | recommendedOnly = false |
||
) | [virtual] |
This method is a special version of WPropertyBase::set for groups.
It allows to set the values of the contained properties. It does not add nor remove properties. It searches the property by name (recursively) and sets the value from the specified property group's property. You can use the exclusion list to exclude a certain property.
value | the source values |
exclude | a list of property names to exclude. Use complete names here, which means, when having nested groups, apply the rules defined in WPropertyGroupBase::findProperty. |
recommendedOnly | if true, property types which support recommended values apply the given value as recommendation. |
Definition at line 159 of file WPropertyGroup.cpp.
References setImpl().
bool WPropertyGroup::setAsString | ( | std::string | value | ) | [virtual] |
This methods allows properties to be set by a string value.
This method does nothing here, as groups can not be set in any kind.
value | the new value to set. IGNORED. |
Implements WPropertyBase.
Definition at line 68 of file WPropertyGroup.cpp.
bool WPropertyGroup::setImpl | ( | boost::shared_ptr< WPropertyGroup > | value, |
std::string | path = "" , |
||
std::vector< std::string > | exclude = std::vector< std::string >() , |
||
bool | recommendedOnly = false |
||
) | [protected, virtual] |
This function implements the set functionality.
It works recursively and keeps track of the current path.
value | the value source |
path | the current path inside the source property group |
exclude | exclude list with paths relative to the original source group |
recommendedOnly | recommendation flag. |
Definition at line 164 of file WPropertyGroup.cpp.
References WPropertyGroupBase::findProperty(), and WPropertyGroupBase::separator.
Referenced by set().