OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
WPropertyGroup Class Reference

Class to manage properties of an object and to provide convenience methods for easy access and manipulation. More...

#include <WPropertyGroup.h>

+ Inheritance diagram for WPropertyGroup:
+ Collaboration diagram for WPropertyGroup:

Public Types

typedef std::shared_ptr< WPropertyGroupSPtr
 shared pointer to object of this type More...
 
typedef std::shared_ptr< const WPropertyGroupConstSPtr
 const shared pointer to object of this type More...
 
typedef WPropertyGroupPtr
 pointer to object of this type More...
 
typedef const WPropertyGroupConstPtr
 const pointer to object of this type More...
 
typedef WPropertyGroupRef
 ref to object of this type More...
 
typedef const WPropertyGroupConstRef
 const ref to object of this type More...
 
typedef WPropertyGroupBase::PropertyContainerType PropertyContainerType
 For shortening: a type defining a shared vector of WSubject pointers. More...
 
typedef WPropertyGroupBase::PropertySharedContainerType PropertySharedContainerType
 The alias for a shared container. More...
 
typedef WPropertyGroupBase::PropertyConstIterator PropertyConstIterator
 The const iterator type of the container. More...
 
typedef WPropertyGroupBase::PropertyIterator PropertyIterator
 The iterator type of the container. More...
 
- Public Types inherited from WPropertyGroupBase
typedef std::vector< std::shared_ptr< WPropertyBase > > PropertyContainerType
 For shortening: a type defining a shared vector of WSubject pointers. More...
 
typedef WSharedSequenceContainer< PropertyContainerTypePropertySharedContainerType
 The alias for a shared container. More...
 
typedef PropertyContainerType::const_iterator PropertyConstIterator
 The const iterator type of the container. More...
 
typedef PropertyContainerType::iterator PropertyIterator
 The iterator type of the container. More...
 
typedef std::shared_ptr< WPropertyGroupBaseSPtr
 Convenience typedef for a std::shared_ptr< WPropertyGroupBase >. More...
 
typedef std::shared_ptr< const WPropertyGroupBaseConstSPtr
 Convenience typedef for a std::shared_ptr< const WPropertyGroupBase >. More...
 
typedef boost::function< void(std::string, std::string)> PropertyStringVisitor
 The visitor type used to visit properties as strings. More...
 
- Public Types inherited from WPropertyBase
typedef std::shared_ptr< WPropertyBaseSPtr
 Convenience typedef for a std::shared_ptr< WPropertyBase > More...
 
typedef std::shared_ptr< const WPropertyBaseConstSPtr
 Convenience typedef for a std::shared_ptr< const WPropertyBase > More...
 
typedef boost::function< void(std::shared_ptr< WPropertyBase >)> PropertyChangeNotifierType
 Signal signature emitted during set operations. More...
 

Public Member Functions

 WPropertyGroup (std::string name="unnamed group", std::string description="an unnamed group of properties")
 Constructor. More...
 
 WPropertyGroup (const WPropertyGroup &from)
 Copy constructor. More...
 
virtual ~WPropertyGroup ()
 destructor More...
 
virtual std::shared_ptr< WPropertyBaseclone ()
 This method clones a property and returns the clone. More...
 
virtual PROPERTY_TYPE getType () const
 Gets the real type of this instance. More...
 
virtual bool setAsString (std::string value)
 This methods allows properties to be set by a string value. More...
 
virtual std::string getAsString ()
 Returns the current value as a string. More...
 
virtual bool set (std::shared_ptr< WPropertyBase > value, bool recommendedOnly=false)
 Sets the value from the specified property to this one. More...
 
virtual bool set (std::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. More...
 
virtual void clear ()
 Removes all properties from the list. More...
 
template<typename PropType >
PropType addProperty (PropType prop)
 Insert the specified property into the list. More...
 
void removeProperty (std::shared_ptr< WPropertyBase > prop)
 Remove the specified property from the list. More...
 
WPropGroup addPropertyGroup (std::string name, std::string description, bool hide=false)
 Create and add a new property group. More...
 
template<typename T >
std::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. More...
 
template<typename T >
std::shared_ptr< WPropertyVariable< T > > addProperty (std::string name, std::string description, const T &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
template<typename T >
std::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. More...
 
template<typename T >
std::shared_ptr< WPropertyVariable< T > > addProperty (std::string name, std::string description, const T &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
WPropBool addProperty (std::string name, std::string description, const WPVBaseTypes::PV_BOOL &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropInt addProperty (std::string name, std::string description, const WPVBaseTypes::PV_INT &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropDouble addProperty (std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropString addProperty (std::string name, std::string description, const WPVBaseTypes::PV_STRING &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropFilename addProperty (std::string name, std::string description, const WPVBaseTypes::PV_PATH &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropSelection addProperty (std::string name, std::string description, const WPVBaseTypes::PV_SELECTION &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropPosition addProperty (std::string name, std::string description, const WPVBaseTypes::PV_POSITION &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropColor addProperty (std::string name, std::string description, const WPVBaseTypes::PV_COLOR &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropTrigger addProperty (std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER &initial, std::shared_ptr< WCondition > condition, bool hide=false)
 Create and add a new property of the template type. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
WPropBool addProperty (std::string name, std::string description, const WPVBaseTypes::PV_BOOL &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropInt addProperty (std::string name, std::string description, const WPVBaseTypes::PV_INT &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropDouble addProperty (std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropString addProperty (std::string name, std::string description, const WPVBaseTypes::PV_STRING &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropFilename addProperty (std::string name, std::string description, const WPVBaseTypes::PV_PATH &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropSelection addProperty (std::string name, std::string description, const WPVBaseTypes::PV_SELECTION &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropPosition addProperty (std::string name, std::string description, const WPVBaseTypes::PV_POSITION &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropColor addProperty (std::string name, std::string description, const WPVBaseTypes::PV_COLOR &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
WPropTrigger addProperty (std::string name, std::string description, const WPVBaseTypes::PV_TRIGGER &initial, std::shared_ptr< WCondition > condition, WPropertyBase::PropertyChangeNotifierType notifier, bool hide=false)
 Create and add a new property of the template type. More...
 
- Public Member Functions inherited from WPropertyGroupBase
 WPropertyGroupBase (std::string name, std::string description)
 Constructor. More...
 
 WPropertyGroupBase (const WPropertyGroupBase &from)
 Copy constructor. More...
 
virtual ~WPropertyGroupBase ()
 Destructor. More...
 
virtual bool existsProperty (std::string name)
 Helper function that finds a property by its name. More...
 
virtual std::shared_ptr< WPropertyBasegetProperty (std::string name)
 Function searches the property. More...
 
virtual PropertySharedContainerType::ReadTicket getProperties () const
 Returns a read ticket for read-access to the list of properties. More...
 
virtual PropertySharedContainerType::ReadTicket getReadTicket () const
 Returns an read ticket for the properties. More...
 
virtual std::shared_ptr< WPropertyBasefindProperty (std::string name) const
 Searches the property with a given name. More...
 
virtual void visitAsString (PropertyStringVisitor visitor, std::string pathPrefix="") const
 Visit all leafs in the property three that aren't empty groups. More...
 
bool autoHideEmpty () const
 Checks whether the property group should be hidden if it is empty. More...
 
void setAutoHideEmpty (bool autoHide=true)
 Should the property group be hidden automatically if it is empty? By default, this is true. More...
 
- Public Member Functions inherited from WPropertyBase
 WPropertyBase (std::string name, std::string description)
 Create an empty named property. More...
 
 WPropertyBase (const WPropertyBase &from)
 Copy constructor. More...
 
virtual ~WPropertyBase ()
 Destructor. More...
 
std::string getName () const
 Gets the name of the class. More...
 
std::string getDescription () const
 Gets the description of the property. More...
 
bool isHidden () const
 Determines whether the property is hidden or not. More...
 
void setHidden (bool hidden=true)
 Sets the property hidden. More...
 
virtual PROPERTY_PURPOSE getPurpose () const
 Gets the purpose of a property. More...
 
virtual void setPurpose (PROPERTY_PURPOSE purpose)
 Sets the purpose of the property. More...
 
template<typename T >
bool set (const T &value)
 Shortcut to set a property with a given value. More...
 
virtual std::shared_ptr< WConditiongetUpdateCondition () const
 This method returns a condition which gets fired whenever the property changes somehow. More...
 
WPropInt toPropInt ()
 Helper converts this instance to its native type. More...
 
WPropDouble toPropDouble ()
 Helper converts this instance to its native type. More...
 
WPropBool toPropBool ()
 Helper converts this instance to its native type. More...
 
WPropString toPropString ()
 Helper converts this instance to its native type. More...
 
WPropFilename toPropFilename ()
 Helper converts this instance to its native type. More...
 
WPropSelection toPropSelection ()
 Helper converts this instance to its native type. More...
 
WPropColor toPropColor ()
 Helper converts this instance to its native type. More...
 
WPropPosition toPropPosition ()
 Helper converts this instance to its native type. More...
 
WPropTrigger toPropTrigger ()
 Helper converts this instance to its native type. More...
 
WPropMatrix4X4 toPropMatrix4X4 ()
 Helper converts this instance to its native type. More...
 
WPropTransferFunction toPropTransferFunction ()
 Helper converts this instance to its native type. More...
 
WPropGroup toPropGroup ()
 Helper converts this instance to its native type. More...
 
WPropInterval toPropInterval ()
 Helper converts this instance to its native type. More...
 
std::shared_ptr< WPropertyGroupBasetoPropGroupBase ()
 Convert the property to a WPropertyGroupBase. More...
 
template<typename T >
std::shared_ptr< WPropertyVariable< T > > toPropertyVariable ()
 Helper converts this instance to an arbitrary type. More...
 

Protected Member Functions

virtual bool setImpl (std::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. More...
 
- Protected Member Functions inherited from WPropertyGroupBase
virtual std::shared_ptr< WPropertyBasefindProperty (const WPropertyGroupBase *const props, std::string name) const
 Helping function to find a property inside a specific group. More...
 
bool propNamePredicate (std::shared_ptr< WPropertyBase > prop1, std::shared_ptr< WPropertyBase > prop2) const
 Compares the names of two properties and returns true if they are equal. More...
 
void addArbitraryProperty (WPropertyBase::SPtr prop)
 Insert the specified property into the list. More...
 
- Protected Member Functions inherited from WPropertyBase
virtual void updateType ()
 Calculates the type of the property. More...
 

Friends

class WPropertiesTest
 Access for test class. More...
 

Additional Inherited Members

- Static Public Attributes inherited from WPropertyGroupBase
static const std::string separator = "/"
 The separator used to separate groups and subgroups. More...
 
- Protected Types inherited from WPropertyBase
typedef boost::signals2::signal< void(std::shared_ptr< WPropertyBase >)> PropertyChangeSignalType
 Signal used for firing change signals. More...
 
- Protected Attributes inherited from WPropertyGroupBase
PropertySharedContainerType m_properties
 The set of proerties. More...
 
- Protected Attributes inherited from WPropertyBase
std::string m_name
 Name of the property. More...
 
std::string m_description
 Description of the property. More...
 
bool m_hidden
 Flag denoting whether the property is hidden or not. More...
 
PROPERTY_TYPE m_type
 Type of the PropertyVariable instance. More...
 
PROPERTY_PURPOSE m_purpose
 The purpose of this property. More...
 
PropertyChangeSignalType signal_PropertyChange
 Signal getting fired whenever the property changes. More...
 
std::shared_ptr< WConditionSetm_updateCondition
 Condition notified whenever something changes. More...
 

Detailed Description

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".

Note
The root group of each module does not have a name.

Definition at line 50 of file WPropertyGroup.h.

Member Typedef Documentation

◆ ConstPtr

const pointer to object of this type

Definition at line 58 of file WPropertyGroup.h.

◆ ConstRef

const ref to object of this type

Definition at line 60 of file WPropertyGroup.h.

◆ ConstSPtr

typedef std::shared_ptr< const WPropertyGroup > WPropertyGroup::ConstSPtr

const shared pointer to object of this type

Definition at line 56 of file WPropertyGroup.h.

◆ PropertyConstIterator

The const iterator type of the container.

Definition at line 75 of file WPropertyGroup.h.

◆ PropertyContainerType

For shortening: a type defining a shared vector of WSubject pointers.

Definition at line 65 of file WPropertyGroup.h.

◆ PropertyIterator

The iterator type of the container.

Definition at line 80 of file WPropertyGroup.h.

◆ PropertySharedContainerType

The alias for a shared container.

Definition at line 70 of file WPropertyGroup.h.

◆ Ptr

pointer to object of this type

Definition at line 57 of file WPropertyGroup.h.

◆ Ref

ref to object of this type

Definition at line 59 of file WPropertyGroup.h.

◆ SPtr

typedef std::shared_ptr< WPropertyGroup > WPropertyGroup::SPtr

shared pointer to object of this type

Definition at line 55 of file WPropertyGroup.h.

Constructor & Destructor Documentation

◆ WPropertyGroup() [1/2]

WPropertyGroup::WPropertyGroup ( std::string  name = "unnamed group",
std::string  description = "an unnamed group of properties" 
)

Constructor.

Creates an empty list of properties.

Note
WModule::getProperties always returns an unnamed instance.
Parameters
namethe name of the property group. The GUI is using this name for naming the tabs/group boxes
descriptionthe description of the group.

Definition at line 39 of file WPropertyGroup.cpp.

Referenced by addPropertyGroup(), and clone().

+ Here is the caller graph for this function:

◆ WPropertyGroup() [2/2]

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).

Note
the properties inside this list are also copied deep
Parameters
fromthe instance to copy.

Definition at line 50 of file WPropertyGroup.cpp.

◆ ~WPropertyGroup()

WPropertyGroup::~WPropertyGroup ( )
virtual

destructor

Definition at line 45 of file WPropertyGroup.cpp.

Member Function Documentation

◆ addProperty() [1/41]

template<typename PropType >
PropType WPropertyGroup::addProperty ( PropType  prop)

Insert the specified property into the list.

Parameters
propthe property to add
Returns
The given prop.

Definition at line 925 of file WPropertyGroup.h.

References WPropertyGroupBase::addArbitraryProperty().

Referenced by addProperty(), and addPropertyGroup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addProperty() [2/41]

template<typename T >
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 932 of file WPropertyGroup.h.

References addProperty().

+ Here is the call graph for this function:

◆ addProperty() [3/41]

template<typename T >
std::shared_ptr< WPropertyVariable< T > > WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const T &  initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 943 of file WPropertyGroup.h.

References addProperty().

+ Here is the call graph for this function:

◆ addProperty() [4/41]

template<typename T >
std::shared_ptr< WPropertyVariable< T > > WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const T &  initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 967 of file WPropertyGroup.h.

References addProperty().

+ Here is the call graph for this function:

◆ addProperty() [5/41]

template<typename T >
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 955 of file WPropertyGroup.h.

References addProperty().

+ Here is the call graph for this function:

◆ addProperty() [6/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 251 of file WPropertyGroup.cpp.

◆ addProperty() [7/41]

WPropBool WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_BOOL initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 303 of file WPropertyGroup.cpp.

◆ addProperty() [8/41]

WPropBool WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_BOOL initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 426 of file WPropertyGroup.cpp.

◆ addProperty() [9/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 364 of file WPropertyGroup.cpp.

◆ addProperty() [10/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 286 of file WPropertyGroup.cpp.

◆ addProperty() [11/41]

WPropColor WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_COLOR initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 345 of file WPropertyGroup.cpp.

◆ addProperty() [12/41]

WPropColor WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_COLOR initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 475 of file WPropertyGroup.cpp.

◆ addProperty() [13/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 406 of file WPropertyGroup.cpp.

◆ addProperty() [14/41]

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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 261 of file WPropertyGroup.cpp.

◆ addProperty() [15/41]

WPropDouble WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_DOUBLE initial,
std::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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 315 of file WPropertyGroup.cpp.

◆ addProperty() [16/41]

WPropDouble WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_DOUBLE initial,
std::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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 440 of file WPropertyGroup.cpp.

◆ addProperty() [17/41]

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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 376 of file WPropertyGroup.cpp.

◆ addProperty() [18/41]

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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 256 of file WPropertyGroup.cpp.

◆ addProperty() [19/41]

WPropInt WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_INT initial,
std::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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 309 of file WPropertyGroup.cpp.

◆ addProperty() [20/41]

WPropInt WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_INT initial,
std::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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 433 of file WPropertyGroup.cpp.

◆ addProperty() [21/41]

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].

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 370 of file WPropertyGroup.cpp.

◆ addProperty() [22/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 271 of file WPropertyGroup.cpp.

◆ addProperty() [23/41]

WPropFilename WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_PATH initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 327 of file WPropertyGroup.cpp.

◆ addProperty() [24/41]

WPropFilename WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_PATH initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 454 of file WPropertyGroup.cpp.

◆ addProperty() [25/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 388 of file WPropertyGroup.cpp.

◆ addProperty() [26/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 281 of file WPropertyGroup.cpp.

◆ addProperty() [27/41]

WPropPosition WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_POSITION initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 339 of file WPropertyGroup.cpp.

◆ addProperty() [28/41]

WPropPosition WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_POSITION initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 468 of file WPropertyGroup.cpp.

◆ addProperty() [29/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 400 of file WPropertyGroup.cpp.

◆ addProperty() [30/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 276 of file WPropertyGroup.cpp.

◆ addProperty() [31/41]

WPropSelection WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_SELECTION initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 333 of file WPropertyGroup.cpp.

◆ addProperty() [32/41]

WPropSelection WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_SELECTION initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 461 of file WPropertyGroup.cpp.

◆ addProperty() [33/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 394 of file WPropertyGroup.cpp.

◆ addProperty() [34/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 266 of file WPropertyGroup.cpp.

◆ addProperty() [35/41]

WPropString WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_STRING initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 321 of file WPropertyGroup.cpp.

◆ addProperty() [36/41]

WPropString WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_STRING initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 447 of file WPropertyGroup.cpp.

◆ addProperty() [37/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 382 of file WPropertyGroup.cpp.

◆ addProperty() [38/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 291 of file WPropertyGroup.cpp.

◆ addProperty() [39/41]

WPropTrigger WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_TRIGGER initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
conditionuse this external condition for notification.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 351 of file WPropertyGroup.cpp.

◆ addProperty() [40/41]

WPropTrigger WPropertyGroup::addProperty ( std::string  name,
std::string  description,
const WPVBaseTypes::PV_TRIGGER initial,
std::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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
conditionuse this external condition for notification
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 482 of file WPropertyGroup.cpp.

◆ addProperty() [41/41]

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.

See also
WPropertyVariable
Parameters
namethe property name
descriptionthe property description
initialthe initial value
notifieruse this notifier for change callbacks.
hideset to true to set the hide flag directly.
Returns
the newly created property variable instance.

Definition at line 412 of file WPropertyGroup.cpp.

◆ addPropertyGroup()

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.

Parameters
namethe name of the group.
descriptionthe description of the group.
hidetrue if group should be completely hidden.
Returns
The newly created property group.

Definition at line 230 of file WPropertyGroup.cpp.

References addProperty(), and WPropertyGroup().

+ Here is the call graph for this function:

◆ clear()

void WPropertyGroup::clear ( )
virtual

Removes all properties from the list.

Definition at line 238 of file WPropertyGroup.cpp.

References WSharedObject< T >::getWriteTicket(), and WPropertyGroupBase::m_properties.

+ Here is the call graph for this function:

◆ clone()

std::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.

Note
this simply ensures the copy constructor of the runtime type is issued.
Returns
the deep clone of this property.

Implements WPropertyBase.

Definition at line 56 of file WPropertyGroup.cpp.

References WPropertyGroup().

+ Here is the call graph for this function:

◆ getAsString()

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.

Returns
the value as a string.

Implements WPropertyBase.

Definition at line 73 of file WPropertyGroup.cpp.

◆ getType()

PROPERTY_TYPE WPropertyGroup::getType ( ) const
virtual

Gets the real type of this instance.

In this case, PV_GROUP.

Returns
the real type.

Reimplemented from WPropertyBase.

Definition at line 62 of file WPropertyGroup.cpp.

◆ removeProperty()

void WPropertyGroup::removeProperty ( std::shared_ptr< WPropertyBase prop)

Remove the specified property from the list.

If the given property is not in the list, nothing happens.

Parameters
propthe property to remove.

Definition at line 217 of file WPropertyGroup.cpp.

References WSharedObject< T >::getWriteTicket(), WPropertyGroupBase::m_properties, and WPropertyBase::m_updateCondition.

+ Here is the call graph for this function:

◆ set() [1/2]

bool WPropertyGroup::set ( std::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.

Parameters
valuethe new value.
recommendedOnlyif true, property types which support recommended values apply the given value as recommendation.
Returns
true if the values of the children could be set. If one could not be set, false

Implements WPropertyBase.

Definition at line 144 of file WPropertyGroup.cpp.

◆ set() [2/2]

bool WPropertyGroup::set ( std::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.

Parameters
valuethe source values
excludea list of property names to exclude. Use complete names here, which means, when having nested groups, apply the rules defined in WPropertyGroupBase::findProperty.
recommendedOnlyif true, property types which support recommended values apply the given value as recommendation.
Returns
true if the values of the children could be set. If one could not be set, false

Definition at line 158 of file WPropertyGroup.cpp.

References setImpl().

+ Here is the call graph for this function:

◆ setAsString()

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.

Parameters
valuethe new value to set. IGNORED.
Returns
always true

Implements WPropertyBase.

Definition at line 67 of file WPropertyGroup.cpp.

◆ setImpl()

bool WPropertyGroup::setImpl ( std::shared_ptr< WPropertyGroup value,
std::string  path = "",
std::vector< std::string >  exclude = std::vector< std::string >(),
bool  recommendedOnly = false 
)
protectedvirtual

This function implements the set functionality.

It works recursively and keeps track of the current path.

Parameters
valuethe value source
paththe current path inside the source property group
excludeexclude list with paths relative to the original source group
recommendedOnlyrecommendation flag.
Returns
true if everything was set successfully.

Definition at line 163 of file WPropertyGroup.cpp.

References WPropertyGroupBase::findProperty(), and WPropertyGroupBase::separator.

Referenced by set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ WPropertiesTest

friend class WPropertiesTest
friend

Access for test class.

Definition at line 52 of file WPropertyGroup.h.


The documentation for this class was generated from the following files: