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

FloatValue.h

Go to the documentation of this file.
00001 // FloatValue.h: interface for the CFloatValue 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 _FLOATVALUE_H
00015 #define _FLOATVALUE_H
00016 
00017 #include "Value.h"
00018 
00019 
00020 class CFloatValue : public CPropValue 
00021 {
00022         //PLUGIN_DECLARE_SERIAL (CFloatValue,CValue)
00023 public:
00024         CFloatValue();
00025         CFloatValue(float fl);
00026         CFloatValue(float fl,CCString name,AllocationTYPE alloctype=CValue::HEAPVALUE);
00027 
00028         virtual const CCString & GetText();
00029 
00030         void Configure(CValue* menuvalue);
00031         virtual float GetNumber();
00032         virtual void SetValue(CValue* newval) {         
00033                 m_float = newval->GetNumber(); 
00034                 SetModified(true);
00035                 
00036         };
00037         float GetFloat();
00038         void SetFloat(float fl) { m_float = fl; SetModified(true);};
00039         virtual ~CFloatValue();
00040         virtual CValue* GetReplica();
00041         virtual CValue* Calc(VALUE_OPERATOR op, CValue *val);
00042         virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
00043         virtual PyObject*       ConvertValueToPython() {
00044                 return PyFloat_FromDouble(m_float);
00045         }
00046 protected:
00047         float m_float;
00048         CCString* m_pstrRep;
00049 
00050 };
00051 
00052 #endif // !defined _FLOATVALUE_H

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