28 #include <boost/filesystem.hpp>
30 #include "exceptions/WPropertyNameMalformed.h"
31 #include "WProperties.h"
32 #include "WPropertyBase.h"
33 #include "WPropertyGroupBase.h"
34 #include "WPropertyVariable.h"
36 #include "WTransferFunction.h"
41 m_description( description ),
43 m_purpose( PV_PURPOSE_PARAMETER ),
44 signal_PropertyChange(),
48 if( (
m_name.find( std::string(
"/" ) ) != std::string::npos ) ||
m_name.empty() )
51 "\" is malformed. Do not use slashes (\"/\") or empty strings in property names." ) );
57 m_name( from.m_name ),
58 m_description( from.m_description ),
59 m_hidden( from.m_hidden ),
60 m_type( from.m_type ),
61 m_purpose( from.m_purpose ),
62 signal_PropertyChange(),
118 return boost::dynamic_pointer_cast<
WPVInt >( shared_from_this() );
123 return boost::dynamic_pointer_cast<
WPVDouble >( shared_from_this() );
128 return boost::dynamic_pointer_cast<
WPVBool >( shared_from_this() );
133 return boost::dynamic_pointer_cast<
WPVString >( shared_from_this() );
138 return boost::dynamic_pointer_cast<
WPVFilename >( shared_from_this() );
143 return boost::dynamic_pointer_cast<
WPVSelection >( shared_from_this() );
148 return boost::dynamic_pointer_cast<
WPVColor >( shared_from_this() );
153 return boost::dynamic_pointer_cast<
WPVPosition >( shared_from_this() );
158 return boost::dynamic_pointer_cast<
WPVGroup >( shared_from_this() );
168 return boost::dynamic_pointer_cast<
WPVMatrix4X4 >( shared_from_this() );
173 return boost::dynamic_pointer_cast<
WPVTrigger >( shared_from_this() );
188 return boost::dynamic_pointer_cast<
WPVInterval >( shared_from_this() );
WPropTransferFunction toPropTransferFunction()
Helper converts this instance to its native type.
WPropMatrix4X4 toPropMatrix4X4()
Helper converts this instance to its native type.
WPropertyBase(std::string name, std::string description)
Create an empty named property.
virtual boost::shared_ptr< WCondition > getUpdateCondition() const
This method returns a condition which gets fired whenever the property changes somehow.
A named property class with a concrete type.
WPropSelection toPropSelection()
Helper converts this instance to its native type.
WPropColor toPropColor()
Helper converts this instance to its native type.
virtual ~WPropertyBase()
Destructor.
WPropTrigger toPropTrigger()
Helper converts this instance to its native type.
boost::shared_ptr< WPropertyGroupBase > SPtr
Convenience typedef for a boost::shared_ptr< WPropertyGroupBase >.
virtual void setPurpose(PROPERTY_PURPOSE purpose)
Sets the purpose of the property.
virtual PROPERTY_TYPE getType() const
Gets the real WPropertyVariable type of this instance.
PROPERTY_TYPE m_type
Type of the PropertyVariable instance.
WPropGroup toPropGroup()
Helper converts this instance to its native type.
WPropInt toPropInt()
Helper converts this instance to its native type.
Class allowing multiple conditions to be used for one waiting cycle.
boost::shared_ptr< WConditionSet > m_updateCondition
Condition notified whenever something changes.
boost::shared_ptr< WPropertyGroupBase > toPropGroupBase()
Convert the property to a WPropertyGroupBase.
virtual PROPERTY_PURPOSE getPurpose() const
Gets the purpose of a property.
std::string m_name
Name of the property.
WPropDouble toPropDouble()
Helper converts this instance to its native type.
Class to manage properties of an object and to provide convenience methods for easy access and manipu...
bool m_hidden
Flag denoting whether the property is hidden or not.
PROPERTY_PURPOSE m_purpose
The purpose of this property.
WPropBool toPropBool()
Helper converts this instance to its native type.
This is the base class and interface for property groups.
std::string m_description
Description of the property.
void setHidden(bool hidden=true)
Sets the property hidden.
Abstract base class for all properties.
bool isHidden() const
Determines whether the property is hidden or not.
WPropFilename toPropFilename()
Helper converts this instance to its native type.
WPropInterval toPropInterval()
Helper converts this instance to its native type.
WPropPosition toPropPosition()
Helper converts this instance to its native type.
WPropString toPropString()
Helper converts this instance to its native type.
virtual void updateType()
Calculates the type of the property.
std::string getName() const
Gets the name of the class.
std::string getDescription() const
Gets the description of the property.