OpenWalnut 1.3.1
|
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 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. | |
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 895 of file WPropertyGroup.h.
References WPropertyGroupBase::addArbitraryProperty().
Referenced by addProperty(), and addPropertyGroup().
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 441 of file WPropertyGroup.cpp.
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 902 of file WPropertyGroup.h.
References addProperty().
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 427 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 420 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 413 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 220 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 399 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 392 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 385 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 225 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 365 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 359 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 353 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 323 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 329 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 335 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 341 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 230 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 310 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 304 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 298 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 347 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 286 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 235 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 274 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 434 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 262 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 406 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 245 of file WPropertyGroup.cpp.
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 913 of file WPropertyGroup.h.
References addProperty().
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 240 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 371 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 250 of file WPropertyGroup.cpp.
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 925 of file WPropertyGroup.h.
References addProperty().
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 215 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 292 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 280 of file WPropertyGroup.cpp.
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 937 of file WPropertyGroup.h.
References addProperty().
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 268 of file WPropertyGroup.cpp.
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 210 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 189 of file WPropertyGroup.cpp.
References addProperty(), and WPropertyGroup().
void WPropertyGroup::clear | ( | ) | [virtual] |
Removes all properties from the list.
Definition at line 197 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 176 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.
References WPropertyGroupBase::findProperty(), and WPropertyGroupBase::getReadTicket().
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.