RTFX  0.3
Real time special effects collaborative visualization and production library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
RTFXPropertyColour.h
Go to the documentation of this file.
1 #ifndef __RTFX_PROPERTY_COLOUR__
2 #define __RTFX_PROPERTY_COLOUR__
3 
4 
5 
6 #include "RTFXBoostIncludes.h"
7 
8 #include "RTFXMath.h"
9 #include "RTFXRecorder.h"
10 #include "RTFXHelpers.h"
11 
20 using namespace std;
21 
22 namespace RTFX
23 {
31  class RTFXAPI RTFXPropertyColour : public RTFXProperty
32  {
33  public:
36  {
37  SetType( RTFXProperty::COLOUR );
38  value = Colour();
39  }
40 
43 
45  void SetValue( Colour _value )
46  {
47  boost::lock_guard<boost::mutex> lock( *dataLock );
48  value = _value;
49  SetChanged( true );
50 
51  }
52 
54  Colour GetValue()
55  {
56  boost::lock_guard<boost::mutex> lock( *dataLock );
57  SetChanged( false );
58  return value;
59  }
60 
63  bool EqualTo( RTFXProperty * _other )
64  {
65  // Check if Property types match (just in case)
66  if ( GetType() == _other->GetType() )
67  {
68  if ( value == (( RTFXPropertyColour * )_other)->value )
69  return true;
70  }
71  return false;
72  }
73 
75  void ChangeFrame( AXISFRAME _frameA, AXISFRAME _frameB )
76  {
77  }
78 
80  void Copy( RTFXProperty * _p )
81  {
82  SetID( _p->GetID() );
83  SetName( _p->GetName() );
84  SetDescription( _p->GetDescription() );
85  SetOwner( _p->GetOwner() );
86  SetChanged( _p->GetChanged() );
87  SetType( _p->GetType() );
88  SetDelete( _p->GetDelete() );
89 
90  RTFXPropertyColour * ptr = ( RTFXPropertyColour * )_p;
91  SetValue( ptr->GetValue() );
92  }
93 
94  private:
95 
98 
100  friend class boost::serialization::access;
101 
102  template<class Archive>
103  void serialize( Archive &_ar, const unsigned int _version )
104  {
105  _ar & boost::serialization::base_object<RTFXProperty>( *this );
106  _ar & value;
107  };
108  };
109 }
110 
111 BOOST_CLASS_EXPORT_KEY( RTFX::RTFXPropertyColour )
112 
113 #endif