Source_Connector.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace iv
6 {
7 
10 template< class T >
11 class Source_Connector : public Field< T >
12 {
13 public:
15 
16  Source_Connector( Instance * inst, T const & default_value, AnimNode< T > * child = nullptr, Attr< T > * source = nullptr );
17  Instance * instance() const;
18 
19  void SetSource( Attr< T > * source ) { this->Assign_Attribute_R( source ); }
20  void SetChild( AnimNode< T > * child );
21 
22 private:
23  //--------------------- Field ---------------------------------------
24  virtual void OnChanged( bool real ) override;
25 
26 private:
27  Instance * inst;
28  AnimNode< T > * child;
29  T default_value;
30 };
31 
32 
33 }
34 
35 #include "Source_Connector.inl"