Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

BoolValue.h

Go to the documentation of this file.
00001 // BoolValue.h: interface for the CBoolValue class.
00002 /*
00003  * Copyright (c) 1996-2000 Erwin Coumans <[email protected]>

00004  *
00005  * Permission to use, copy, modify, distribute and sell this software

00006  * and its documentation for any purpose is hereby granted without fee,

00007  * provided that the above copyright notice appear in all copies and

00008  * that both that copyright notice and this permission notice appear

00009  * in supporting documentation.  Erwin Coumans makes no

00010  * representations about the suitability of this software for any

00011  * purpose.  It is provided "as is" without express or implied warranty.

00012  *
00013  */
00014 #if !defined _BOOLVALUE_H
00015 #define _BOOLVALUE_H
00016 
00017 #include "Value.h"
00018 
00022 
00023 class CBoolValue : public CPropValue  
00024 {
00025 
00026         //PLUGIN_DECLARE_SERIAL(CBoolValue,CValue)      
00027 
00028 public:
00029         CBoolValue();
00030         CBoolValue(bool inBool)                 : m_bool(inBool) { } // Constructs a new CBoolValue containing <inBool>
00031         CBoolValue(bool innie,CCString name,AllocationTYPE alloctype=CValue::HEAPVALUE);
00032 
00033         virtual const CCString & GetText();
00034         virtual float           GetNumber();
00035         bool                            GetBool();
00036         virtual void            SetValue(CValue* newval)                                                                { m_bool = (newval->GetNumber()!=0); SetModified(true); }
00037         
00038         virtual CValue*         Calc(VALUE_OPERATOR op, CValue *val);
00039         virtual CValue*         CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
00040         
00041         void                            Configure(CValue* menuvalue);
00042         virtual CValue*         GetReplica();
00043 
00044 private:
00045         bool                            m_bool;
00046 };
00047 
00048 #endif // !defined _BOOLVALUE_H

Generated at Thu Feb 1 13:03:01 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000