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

StringValue.h

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

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

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

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

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

00010  * in supporting documentation.  Erwin Coumans makes no

00011  * representations about the suitability of this software for any

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

00013  *
00014  */
00015 
00016 #ifndef __STRINGVALUE_H__
00017 #define __STRINGVALUE_H__
00018 
00019 #include "Value.h"
00020 
00021 class CStringValue : public CPropValue  
00022 {
00023 
00024         
00025         //PLUGIN_DECLARE_SERIAL(CStringValue,CValue)            
00026 public:
00028         CStringValue();
00029         CStringValue (CCString txt, CCString name , AllocationTYPE alloctype = CValue::HEAPVALUE);
00030 
00031         virtual ~CStringValue() {
00032         };
00034         virtual bool            IsEqual(const CCString & other);
00035         virtual const CCString &        GetText();
00036         virtual float           GetNumber();
00037         
00038         virtual CValue*         Calc(VALUE_OPERATOR op, CValue *val);
00039         virtual CValue*         CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
00040         virtual void            SetValue(CValue* newval) {      m_strString = newval->GetText(); SetModified(true);     };
00041         virtual CValue*         GetReplica();
00042         virtual PyObject*       ConvertValueToPython() {
00043                 return PyString_FromString(m_strString.Ptr());
00044         }
00045 
00046 private:
00047         // data member
00048         CCString                                m_strString;
00049 };
00050 
00051 #endif

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