00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef neo_core_activator_h
00022 #define neo_core_activator_h
00023
00027 #include "platform.h"
00028
00029 #if NEO_ENABLE_SCRIPTING
00030 # include "../script/binding.h"
00031 #endif
00032
00033 namespace neo {
00034 namespace core {
00035
00059 class Activator
00060 #if NEO_ENABLE_SCRIPTING
00061 : public virtual script::Scriptable
00062 #endif
00063 {
00064 public:
00065
00067
00070 Activator( bool active = true );
00071
00073
00076 Activator( const Activator& ref );
00077
00078 virtual ~Activator();
00079
00081
00084 void activate();
00085
00087
00090 void deactivate();
00091
00093
00096 inline bool toggle();
00097
00099
00101 inline bool isActive() const;
00102
00104
00108 Activator& operator = ( const Activator& rhs );
00109
00110 protected:
00111
00113
00116 virtual void onActiveStateChange();
00117
00118 #if NEO_ENABLE_SCRIPTING
00119 virtual void getEvents( core::Array< std::string >* p_events );
00120 #endif
00121
00122 private:
00123
00125 bool _active;
00126 };
00127
00128 #include "activator.inl"
00129
00130 }
00131 }
00132
00133 #endif