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. | |
![]() | |
typedef std::vector < boost::shared_ptr < WPropertyBase > > | PropertyContainerType |
For shortening: a type defining a shared vector of WSubject pointers. | |
typedef WSharedSequenceContainer < PropertyContainerType > | PropertySharedContainerType |
The alias for a shared container. | |
typedef PropertyContainerType::const_iterator | PropertyConstIterator |
The const iterator type of the container. | |
typedef PropertyContainerType::iterator | PropertyIterator |
The iterator type of the container. | |
typedef boost::shared_ptr < WPropertyGroupBase > | SPtr |
Convenience typedef for a boost::shared_ptr< WPropertyGroupBase >. | |
typedef boost::shared_ptr < const WPropertyGroupBase > | ConstSPtr |
Convenience typedef for a boost::shared_ptr< const WPropertyGroupBase >. | |
![]() | |
typedef boost::shared_ptr < WPropertyBase > | SPtr |
Convenience typedef for a boost::shared_ptr< WPropertyBase > | |
typedef boost::shared_ptr < const WPropertyBase > | ConstSPtr |
Convenience typedef for a boost::shared_ptr< const WPropertyBase > | |
typedef boost::function< void(boost::shared_ptr < WPropertyBase >)> | PropertyChangeNotifierType |
Signal signature emitted during set operations. |
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. | |
![]() | |
WPropertyGroupBase (std::string name, std::string description) | |
Constructor. | |
WPropertyGroupBase (const WPropertyGroupBase &from) | |
Copy constructor. | |
virtual | ~WPropertyGroupBase () |
Destructor. | |
virtual bool | existsProperty (std::string name) |
Helper function that finds a property by its name. | |
virtual boost::shared_ptr < WPropertyBase > | getProperty (std::string name) |
Function searches the property. | |
virtual PropertySharedContainerType::ReadTicket | getProperties () const |
Returns a read ticket for read-access to the list of properties. | |
virtual PropertySharedContainerType::ReadTicket | getReadTicket () const |
Returns an read ticket for the properties. | |
virtual boost::shared_ptr < WPropertyBase > | findProperty (std::string name) const |
Searches the property with a given name. | |
![]() | |
WPropertyBase (std::string name, std::string description) | |
Create an empty named property. | |
WPropertyBase (const WPropertyBase &from) | |
Copy constructor. | |
virtual | ~WPropertyBase () |
Destructor. | |
std::string | getName () const |
Gets the name of the class. | |
std::string | getDescription () const |
Gets the description of the property. | |
bool | isHidden () const |
Determines whether the property is hidden or not. | |
void | setHidden (bool hidden=true) |
Sets the property hidden. | |
virtual PROPERTY_PURPOSE | getPurpose () const |
Gets the purpose of a property. | |
virtual void | setPurpose (PROPERTY_PURPOSE purpose) |
Sets the purpose of the property. | |
virtual boost::shared_ptr < WCondition > | getUpdateCondition () const |
This method returns a condition which gets fired whenever the property changes somehow. | |
WPropInt | toPropInt () |
Helper converts this instance to its native type. | |
WPropDouble | toPropDouble () |
Helper converts this instance to its native type. | |
WPropBool | toPropBool () |
Helper converts this instance to its native type. | |
WPropString | toPropString () |
Helper converts this instance to its native type. | |
WPropFilename | toPropFilename () |
Helper converts this instance to its native type. | |
WPropSelection | toPropSelection () |
Helper converts this instance to its native type. | |
WPropColor | toPropColor () |
Helper converts this instance to its native type. | |
WPropPosition | toPropPosition () |
Helper converts this instance to its native type. | |
WPropTrigger | toPropTrigger () |
Helper converts this instance to its native type. | |
WPropMatrix4X4 | toPropMatrix4X4 () |
Helper converts this instance to its native type. | |
WPropTransferFunction | toPropTransferFunction () |
Helper converts this instance to its native type. | |
WPropGroup | toPropGroup () |
Helper converts this instance to its native type. | |
boost::shared_ptr < WPropertyGroupBase > | toPropGroupBase () |
Convert the property to a WPropertyGroupBase. | |
template<typename T > | |
boost::shared_ptr < WPropertyVariable< T > > | toPropertyVariable () |
Helper converts this instance to an arbitrary type. |
Friends | |
class | WPropertiesTest |
Additional Inherited Members | |
![]() | |
typedef boost::signals2::signal< void(boost::shared_ptr < WPropertyBase >)> | PropertyChangeSignalType |
Signal used for firing change signals. | |
![]() | |
virtual boost::shared_ptr < WPropertyBase > | findProperty (const WPropertyGroupBase *const props, std::string name) const |
Helping function to find a property inside a specific group. | |
bool | propNamePredicate (boost::shared_ptr< WPropertyBase > prop1, boost::shared_ptr< WPropertyBase > prop2) const |
Compares the names of two properties and returns true if they are equal. | |
void | addArbitraryProperty (WPropertyBase::SPtr prop) |
Insert the specified property into the list. | |
![]() | |
PropertySharedContainerType | m_properties |
The set of proerties. |
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
Definition at line 55 of file WPropertyGroup.h.
The const iterator type of the container.
Definition at line 74 of file WPropertyGroup.h.
For shortening: a type defining a shared vector of WSubject pointers.
Definition at line 64 of file WPropertyGroup.h.
The iterator type of the container.
Definition at line 79 of file WPropertyGroup.h.
The alias for a shared container.
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
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().
|
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.
|
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().
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().
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().
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().
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().
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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, | ||
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.
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.
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.
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.
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, | ||
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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().
|
virtual |
Removes all properties from the list.
Definition at line 197 of file WPropertyGroup.cpp.
References WSharedObject< T >::getWriteTicket(), and WPropertyGroupBase::m_properties.
|
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().
|
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.
|
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.
|
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().
|
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.