valuenode_subtract.h

Go to the documentation of this file.
00001 /* === S Y N F I G ========================================================= */
00021 /* ========================================================================= */
00022 
00023 /* === S T A R T =========================================================== */
00024 
00025 #ifndef __SYNFIG_VALUENODE_SUBTRACT_H
00026 #define __SYNFIG_VALUENODE_SUBTRACT_H
00027 
00028 /* === H E A D E R S ======================================================= */
00029 
00030 #include "valuenode.h"
00031 
00032 /* === M A C R O S ========================================================= */
00033 
00034 /* === C L A S S E S & S T R U C T S ======================================= */
00035 
00036 namespace synfig {
00037 
00038 struct ValueNode_Subtract : public LinkableValueNode
00039 {
00040     typedef etl::handle<ValueNode_Subtract> Handle;
00041     typedef etl::handle<const ValueNode_Subtract> ConstHandle;
00042     
00043 protected:
00044 
00045     ValueNode_Subtract();
00046 
00047 private:
00048 
00049     ValueNode::RHandle ref_a;
00050     ValueNode::RHandle ref_b;
00051     ValueNode::RHandle scalar;
00052 
00053 public:
00054 
00055     virtual ~ValueNode_Subtract();
00056 
00057 //  static Handle create(ValueBase::Type id=ValueBase::TYPE_NIL);
00058 
00060     bool set_lhs(ValueNode::Handle a);
00061 
00063     ValueNode::Handle get_lhs()const { return ref_a; }
00064 
00066     bool set_rhs(ValueNode::Handle b);
00067 
00069     ValueNode::Handle get_rhs()const { return ref_b; }
00070 
00072     bool set_scalar(ValueNode::Handle x);
00073 
00075     ValueNode::Handle get_scalar()const { return scalar; }
00076 
00077     void set_scalar(Real x);
00078 
00079     virtual bool set_link_vfunc(int i,ValueNode::Handle x);
00080 
00081     virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
00082 
00083     virtual int link_count()const;
00084 
00085     virtual String link_local_name(int i)const;
00086     virtual String link_name(int i)const;
00087     virtual int get_link_index_from_name(const String &name)const;
00088 
00089     virtual ValueBase operator()(Time t)const;
00090 
00091     virtual String get_name()const;
00092     virtual String get_local_name()const;
00093 
00094 //  static bool check_type(const ValueBase::Type &type);
00095 
00096     LinkableValueNode* create_new()const;
00097 
00098 public:
00099     using synfig::LinkableValueNode::get_link_vfunc;
00100     using synfig::LinkableValueNode::set_link_vfunc;
00101     static bool check_type(ValueBase::Type type);
00102     static ValueNode_Subtract* create(const ValueBase &x=ValueBase());
00103 }; // END of class ValueNode_Subtract
00104 
00105 }; // END of namespace synfig
00106 
00107 /* === E N D =============================================================== */
00108 
00109 #endif

Generated on Fri Jun 23 15:20:50 2006 for synfig by  doxygen 1.4.6