| |
| |
| #ifndef TDOUBLEPARAMRELAYPROPERTY_H |
| #define TDOUBLEPARAMRELAYPROPERTY_H |
| |
| |
| #include "tproperty.h" |
| |
| |
| #include "tdoubleparam.h" |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TPARAM_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI TDoubleParamRelayProperty : public TProperty, public TParamObserver |
| { |
| TDoubleParamP m_param; |
| double m_frame; |
| |
| public: |
| class Visitor |
| { |
| public: |
| virtual void visit(TDoubleParamRelayProperty *p) = 0; |
| }; |
| |
| public: |
| TDoubleParamRelayProperty(const std::string &name, TDoubleParamP param = TDoubleParamP()); |
| ~TDoubleParamRelayProperty(); |
| |
| TDoubleParamRelayProperty(const TDoubleParamRelayProperty &other); |
| TDoubleParamRelayProperty &operator=(const TDoubleParamRelayProperty &other); |
| |
| TProperty *clone() const; |
| std::string getValueAsString(); |
| |
| void setParam(const TDoubleParamP ¶m); |
| const TDoubleParamP &getParam() const { return m_param; } |
| |
| void setValue(double v); |
| double getValue() const; |
| |
| double frame() const { return m_frame; } |
| double &frame() { return m_frame; } |
| |
| void accept(TProperty::Visitor &v); |
| |
| void onChange(const TParamChange &); |
| }; |
| |
| #endif |
| |