00001 /*************************************************************************** 00002 activator.h - Base class for objects with 00003 activated/deactivated state attribute 00004 ------------------- 00005 begin : Thu Nov 8 2001 00006 copyright : (C) 2001 by Reality Rift Studios 00007 email : mattias@realityrift.com 00008 *************************************************************************** 00009 00010 The contents of this file are subject to the Mozilla Public License Version 00011 1.1 (the "License"); you may not use this file except in compliance with 00012 the License. You may obtain a copy of the License at 00013 http://www.mozilla.org/MPL/ 00014 00015 Software distributed under the License is distributed on an "AS IS" basis, 00016 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00017 for the specific language governing rights and limitations under the 00018 License. 00019 00020 The Original Code is the NeoEngine, activator.h 00021 00022 The Initial Developer of the Original Code is Mattias Jansson. 00023 Portions created by Mattias Jansson are Copyright (C) 2001 00024 Reality Rift Studios. All Rights Reserved. 00025 00026 ***************************************************************************/ 00027 00028 #ifndef __NEACTIVATOR_H 00029 #define __NEACTIVATOR_H 00030 00031 00032 #include "base.h" 00033 00034 00041 namespace NeoEngine 00042 { 00043 00044 00053 class NEOENGINE_API Activator 00054 { 00055 protected: 00056 00058 bool m_bActive; 00059 00060 public: 00061 00066 inline Activator( bool bActive = true ); 00067 00070 inline virtual ~Activator(); 00071 00076 inline bool IsActive() const; 00077 00081 inline virtual void Activate(); 00082 00086 inline virtual void Deactivate(); 00087 00092 inline bool Toggle(); 00093 }; 00094 00095 00096 #include "activator_inl.h" 00097 00098 00099 }; // namespace NeoEngine 00100 00101 00102 #endif 00103