25 #ifndef WPROPERTYBASE_H
26 #define WPROPERTYBASE_H
30 #include <boost/function.hpp>
31 #include <boost/signals2/signal.hpp>
33 #include <boost/shared_ptr.hpp>
34 #include <boost/enable_shared_from_this.hpp>
36 #include "WProperties_Fwd.h"
37 #include "WCondition.h"
38 #include "WConditionSet.h"
39 #include "WExportCommon.h"
44 class OWCOMMON_EXPORT
WPropertyBase:
public boost::enable_shared_from_this< WPropertyBase >
50 typedef boost::shared_ptr< WPropertyBase >
SPtr;
55 typedef boost::shared_ptr< const WPropertyBase >
ConstSPtr;
87 virtual boost::shared_ptr< WPropertyBase > clone() = 0;
94 std::string getName()
const;
101 std::string getDescription()
const;
108 bool isHidden()
const;
115 void setHidden(
bool hidden =
true );
122 virtual PROPERTY_TYPE getType()
const;
135 virtual PROPERTY_PURPOSE getPurpose()
const;
143 virtual void setPurpose( PROPERTY_PURPOSE purpose );
153 virtual bool setAsString( std::string value ) = 0;
161 virtual std::string getAsString() = 0;
178 virtual boost::shared_ptr< WCondition > getUpdateCondition()
const;
188 virtual bool set( boost::shared_ptr< WPropertyBase > value ) = 0;
199 WPropInt toPropInt();
206 WPropDouble toPropDouble();
213 WPropBool toPropBool();
220 WPropString toPropString();
227 WPropFilename toPropFilename();
234 WPropSelection toPropSelection();
241 WPropColor toPropColor();
248 WPropPosition toPropPosition();
255 WPropTrigger toPropTrigger();
262 WPropMatrix4X4 toPropMatrix4X4();
269 WPropGroup toPropGroup();
276 template<
typename T >
277 boost::shared_ptr< WPropertyVariable< T > > toPropertyVariable();
314 virtual void updateType();
335 template<
typename T >
341 #endif // WPROPERTYBASE_H