25 #ifndef WPROPERTYGROUP_H
26 #define WPROPERTYGROUP_H
32 #include "WConditionSet.h"
33 #include "WPropertyBase.h"
34 #include "WPropertyGroupBase.h"
35 #include "WPropertyTypes.h"
36 #include "WPropertyVariable.h"
37 #include "WSharedSequenceContainer.h"
38 #include "exceptions/WPropertyNotUnique.h"
54 typedef boost::shared_ptr< WPropertyGroup >
SPtr;
55 typedef boost::shared_ptr< const WPropertyGroup >
ConstSPtr;
89 WPropertyGroup( std::string name =
"unnamed group", std::string description =
"an unnamed group of properties" );
122 virtual boost::shared_ptr< WPropertyBase >
clone();
129 virtual PROPERTY_TYPE
getType()
const;
159 virtual bool set( boost::shared_ptr< WPropertyBase > value,
bool recommendedOnly =
false );
173 virtual bool set( boost::shared_ptr< WPropertyGroup > value, std::vector< std::string > exclude = std::vector< std::string >(),
174 bool recommendedOnly =
false );
183 virtual void clear();
192 template<
typename PropType >
215 WPropGroup
addPropertyGroup( std::string name, std::string description,
bool hide =
false );
229 template<
typename T>
230 boost::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
bool hide =
false );
245 template<
typename T>
246 boost::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
247 boost::shared_ptr< WCondition > condition,
bool hide =
false );
262 template<
typename T>
263 boost::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
280 template<
typename T>
281 boost::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
282 boost::shared_ptr< WCondition > condition,
447 boost::shared_ptr< WCondition > condition,
bool hide =
false );
464 boost::shared_ptr< WCondition > condition,
bool hide =
false );
481 boost::shared_ptr< WCondition > condition,
bool hide =
false );
497 boost::shared_ptr< WCondition > condition,
bool hide =
false );
513 boost::shared_ptr< WCondition > condition,
bool hide =
false );
529 boost::shared_ptr< WCondition > condition,
bool hide =
false );
545 boost::shared_ptr< WCondition > condition,
bool hide =
false );
561 boost::shared_ptr< WCondition > condition,
bool hide =
false );
577 boost::shared_ptr< WCondition > condition,
bool hide =
false );
755 boost::shared_ptr< WCondition > condition,
774 boost::shared_ptr< WCondition > condition,
793 boost::shared_ptr< WCondition > condition,
812 boost::shared_ptr< WCondition > condition,
830 boost::shared_ptr< WCondition > condition,
848 boost::shared_ptr< WCondition > condition,
866 boost::shared_ptr< WCondition > condition,
884 boost::shared_ptr< WCondition > condition,
902 boost::shared_ptr< WCondition > condition,
916 virtual bool setImpl( boost::shared_ptr< WPropertyGroup > value, std::string path =
"",
917 std::vector< std::string > exclude = std::vector< std::string >(),
918 bool recommendedOnly =
false );
923 template<
typename PropType >
930 template<
typename T>
933 boost::shared_ptr< WPropertyVariable< T > > p = boost::shared_ptr< WPropertyVariable< T > >(
936 p->setHidden( hide );
941 template<
typename T>
943 boost::shared_ptr< WCondition > condition,
bool hide )
945 boost::shared_ptr< WPropertyVariable< T > > p = boost::shared_ptr< WPropertyVariable< T > >(
948 p->setHidden( hide );
953 template<
typename T>
957 boost::shared_ptr< WPropertyVariable< T > > p = boost::shared_ptr< WPropertyVariable< T > >(
960 p->setHidden( hide );
965 template<
typename T>
967 boost::shared_ptr< WCondition > condition,
970 boost::shared_ptr< WPropertyVariable< T > > p = boost::shared_ptr< WPropertyVariable< T > >(
973 p->setHidden( hide );
978 #endif // WPROPERTYGROUP_H
WPropertyGroup * Ptr
pointer to object of this type
int32_t PV_INT
base type used for every WPVInt
boost::filesystem::path PV_PATH
base type used for every WPVFilename
const WPropertyGroup & ConstRef
const ref to object of this type
virtual PROPERTY_TYPE getType() const
Gets the real type of this instance.
virtual ~WPropertyGroup()
destructor
virtual bool setImpl(boost::shared_ptr< WPropertyGroup > value, std::string path="", std::vector< std::string > exclude=std::vector< std::string >(), bool recommendedOnly=false)
This function implements the set functionality.
std::vector< boost::shared_ptr< WPropertyBase > > PropertyContainerType
For shortening: a type defining a shared vector of WSubject pointers.
PropertyContainerType::iterator PropertyIterator
The iterator type of the container.
WPropertyGroupBase::PropertySharedContainerType PropertySharedContainerType
The alias for a shared container.
A named property class with a concrete type.
boost::function< void(boost::shared_ptr< WPropertyBase >)> PropertyChangeNotifierType
Signal signature emitted during set operations.
WPropertyGroup(std::string name="unnamed group", std::string description="an unnamed group of properties")
Constructor.
virtual void clear()
Removes all properties from the list.
This only is a 3d double vector.
WPropertyGroupBase::PropertyIterator PropertyIterator
The iterator type of the container.
void removeProperty(boost::shared_ptr< WPropertyBase > prop)
Remove the specified property from the list.
WPropertyGroupBase::PropertyContainerType PropertyContainerType
For shortening: a type defining a shared vector of WSubject pointers.
double PV_DOUBLE
base type used for every WPVDouble
const WPropertyGroup * ConstPtr
const pointer to object of this type
void addArbitraryProperty(WPropertyBase::SPtr prop)
Insert the specified property into the list.
WPropertyGroupBase::PropertyConstIterator PropertyConstIterator
The const iterator type of the container.
virtual bool set(boost::shared_ptr< WPropertyBase > value, bool recommendedOnly=false)
Sets the value from the specified property to this one.
Class to manage properties of an object and to provide convenience methods for easy access and manipu...
std::string PV_STRING
base type used for every WPVString
This class represents a subset of a WItemSelection.
This is the base class and interface for property groups.
virtual boost::shared_ptr< WPropertyBase > clone()
This method clones a property and returns the clone.
PV_TRIGGER
Enum denoting the possible trigger states.
bool PV_BOOL
base type used for every WPVBool
WColor PV_COLOR
base type used for every WPVColor
boost::shared_ptr< const WPropertyGroup > ConstSPtr
const shared pointer to object of this type
boost::shared_ptr< WPropertyGroup > SPtr
shared pointer to object of this type
PropType addProperty(PropType prop)
Insert the specified property into the list.
WPropGroup addPropertyGroup(std::string name, std::string description, bool hide=false)
Create and add a new property group.
virtual std::string getAsString()
Returns the current value as a string.
PropertyContainerType::const_iterator PropertyConstIterator
The const iterator type of the container.
WPropertyGroup & Ref
ref to object of this type
virtual bool setAsString(std::string value)
This methods allows properties to be set by a string value.