25 #ifndef WPROPERTYGROUP_H
26 #define WPROPERTYGROUP_H
33 #include "WConditionSet.h"
34 #include "WPropertyBase.h"
35 #include "WPropertyGroupBase.h"
36 #include "WPropertyTypes.h"
37 #include "WPropertyVariable.h"
38 #include "WSharedSequenceContainer.h"
39 #include "exceptions/WPropertyNotUnique.h"
55 typedef std::shared_ptr< WPropertyGroup >
SPtr;
56 typedef std::shared_ptr< const WPropertyGroup >
ConstSPtr;
90 WPropertyGroup( std::string name =
"unnamed group", std::string description =
"an unnamed group of properties" );
123 virtual std::shared_ptr< WPropertyBase >
clone();
130 virtual PROPERTY_TYPE
getType()
const;
160 virtual bool set( std::shared_ptr< WPropertyBase > value,
bool recommendedOnly =
false );
174 virtual bool set( std::shared_ptr< WPropertyGroup > value, std::vector< std::string > exclude = std::vector< std::string >(),
175 bool recommendedOnly =
false );
184 virtual void clear();
193 template<
typename PropType >
216 WPropGroup
addPropertyGroup( std::string name, std::string description,
bool hide =
false );
230 template<
typename T>
231 std::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
bool hide =
false );
246 template<
typename T>
247 std::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
248 std::shared_ptr< WCondition > condition,
bool hide =
false );
263 template<
typename T>
264 std::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
281 template<
typename T>
282 std::shared_ptr< WPropertyVariable< T > >
addProperty( std::string name, std::string description,
const T& initial,
283 std::shared_ptr< WCondition > condition,
448 std::shared_ptr< WCondition > condition,
bool hide =
false );
465 std::shared_ptr< WCondition > condition,
bool hide =
false );
482 std::shared_ptr< WCondition > condition,
bool hide =
false );
498 std::shared_ptr< WCondition > condition,
bool hide =
false );
514 std::shared_ptr< WCondition > condition,
bool hide =
false );
530 std::shared_ptr< WCondition > condition,
bool hide =
false );
546 std::shared_ptr< WCondition > condition,
bool hide =
false );
562 std::shared_ptr< WCondition > condition,
bool hide =
false );
578 std::shared_ptr< WCondition > condition,
bool hide =
false );
756 std::shared_ptr< WCondition > condition,
775 std::shared_ptr< WCondition > condition,
794 std::shared_ptr< WCondition > condition,
813 std::shared_ptr< WCondition > condition,
831 std::shared_ptr< WCondition > condition,
849 std::shared_ptr< WCondition > condition,
867 std::shared_ptr< WCondition > condition,
885 std::shared_ptr< WCondition > condition,
903 std::shared_ptr< WCondition > condition,
917 virtual bool setImpl( std::shared_ptr< WPropertyGroup > value, std::string path =
"",
918 std::vector< std::string > exclude = std::vector< std::string >(),
919 bool recommendedOnly =
false );
924 template<
typename PropType >
931 template<
typename T>
934 std::shared_ptr< WPropertyVariable< T > > p = std::shared_ptr< WPropertyVariable< T > >(
937 p->setHidden( hide );
942 template<
typename T>
944 std::shared_ptr< WCondition > condition,
bool hide )
946 std::shared_ptr< WPropertyVariable< T > > p = std::shared_ptr< WPropertyVariable< T > >(
949 p->setHidden( hide );
954 template<
typename T>
958 std::shared_ptr< WPropertyVariable< T > > p = std::shared_ptr< WPropertyVariable< T > >(
961 p->setHidden( hide );
966 template<
typename T>
968 std::shared_ptr< WCondition > condition,
971 std::shared_ptr< WPropertyVariable< T > > p = std::shared_ptr< WPropertyVariable< T > >(
974 p->setHidden( hide );
This class represents a subset of a WItemSelection.
This only is a 3d double vector.
boost::function< void(std::shared_ptr< WPropertyBase >)> PropertyChangeNotifierType
Signal signature emitted during set operations.
This is the base class and interface for property groups.
PropertyContainerType::const_iterator PropertyConstIterator
The const iterator type of the container.
void addArbitraryProperty(WPropertyBase::SPtr prop)
Insert the specified property into the list.
std::vector< std::shared_ptr< WPropertyBase > > PropertyContainerType
For shortening: a type defining a shared vector of WSubject pointers.
PropertyContainerType::iterator PropertyIterator
The iterator type of the container.
Class to manage properties of an object and to provide convenience methods for easy access and manipu...
WPropGroup addPropertyGroup(std::string name, std::string description, bool hide=false)
Create and add a new property group.
PropType addProperty(PropType prop)
Insert the specified property into the list.
std::shared_ptr< WPropertyGroup > SPtr
shared pointer to object of this type
virtual PROPERTY_TYPE getType() const
Gets the real type of this instance.
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.
virtual std::shared_ptr< WPropertyBase > clone()
This method clones a property and returns the clone.
virtual std::string getAsString()
Returns the current value as a string.
const WPropertyGroup & ConstRef
const ref to object of this type
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.
virtual void clear()
Removes all properties from the list.
WPropertyGroupBase::PropertyIterator PropertyIterator
The iterator type of the container.
virtual ~WPropertyGroup()
destructor
WPropertyGroup(std::string name="unnamed group", std::string description="an unnamed group of properties")
Constructor.
WPropertyGroup * Ptr
pointer to object of this type
WPropertyGroupBase::PropertyContainerType PropertyContainerType
For shortening: a type defining a shared vector of WSubject pointers.
virtual bool set(std::shared_ptr< WPropertyBase > value, bool recommendedOnly=false)
Sets the value from the specified property to this one.
WPropertyGroupBase::PropertySharedContainerType PropertySharedContainerType
The alias for a shared container.
void removeProperty(std::shared_ptr< WPropertyBase > prop)
Remove the specified property from the list.
const WPropertyGroup * ConstPtr
const pointer to object of this type
WPropertyGroupBase::PropertyConstIterator PropertyConstIterator
The const iterator type of the container.
std::shared_ptr< const WPropertyGroup > ConstSPtr
const shared pointer to object of this type
A named property class with a concrete type.
PV_TRIGGER
Enum denoting the possible trigger states.
WColor PV_COLOR
base type used for every WPVColor
std::string PV_STRING
base type used for every WPVString
double PV_DOUBLE
base type used for every WPVDouble
bool PV_BOOL
base type used for every WPVBool
boost::filesystem::path PV_PATH
base type used for every WPVFilename
int32_t PV_INT
base type used for every WPVInt