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

skRValue.h

00001 /*
00002   Copyright 1996-2003
00003   Simon Whiteside
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 * $Id: skRValue_8h-source.html,v 1.5 2003/01/23 15:31:03 simkin_cvs Exp $
00020 */
00021 #ifndef skRVALUE_H
00022 #define skRVALUE_H
00023 
00024 #include "skString.h"
00025 
00026 class CLASSEXPORT skiExecutable;
00027 class CLASSEXPORT skObjectRef;
00028 
00032 class CLASSEXPORT  skRValue     
00033 { 
00034  public:
00038   enum RType { T_Object,T_String,T_Int,T_Float,T_Char,T_Bool, NUM_RTYPES };
00039    
00043   skRValue();
00047   skRValue(const skRValue&);
00053   skRValue(skiExecutable * obj,bool created=false);
00057   skRValue(skString s);
00061   skRValue(Char c);
00065   skRValue(int n);
00069   skRValue(unsigned int n);
00073   skRValue(float f);
00077   skRValue(bool b);
00081   ~skRValue();
00085   skRValue& operator=(const skRValue& v);
00089   bool operator==(const skRValue&);
00093   Char  charValue()  const;             
00097   bool  boolValue()  const;             
00101   int intValue()  const;                
00105   float floatValue()  const;            
00109   skString str() const;
00113   skiExecutable * obj()  const;
00117   RType type()  const;
00118  private:                                
00122   unsigned char m_Type;
00126   skString m_String;
00127   
00131   union {
00132     skObjectRef * m_ObjectRef;  
00133     Char m_Char;
00134     int m_Int;
00135     float m_Float;
00136     bool m_Bool;
00137   }m_Value;
00138 };                              
00139 #include "skRValue.inl"
00140 #endif
00141 
00142 

Generated on Thu Jan 23 15:25:39 2003 for Simkin by doxygen1.3-rc1