Main Page   Class Hierarchy   Compound List   File List   Compound Members  

skRValue.h

00001 /*
00002   Copyright 1996-2000
00003   Simon Whiteside
00004 
00005 * $Id: skRValue.h-source.html,v 1.1 2001/03/05 16:22:45 sdw Exp $
00006 */
00007 #ifndef skRVALUE_H
00008 #define skRVALUE_H
00009 
00010 #include "skString.h"
00011 
00012 class skExecutable;
00013 class skObjectRef;
00014 
00018 class skRValue  
00019 { 
00020  public:
00024   enum RType { T_Object,T_String,T_Int,T_Float,T_Char,T_Bool };
00025     
00029   skRValue(); 
00033   skRValue(const skRValue&);
00039   skRValue(skExecutable * obj,bool created=false);
00043   skRValue(skString s);
00047   skRValue(char c);
00051   skRValue(int n);
00055   skRValue(unsigned int n);
00059   skRValue(float f);
00063   skRValue(bool b);
00067   ~skRValue();
00071   skRValue& operator=(const skRValue& v);
00075   bool operator==(const skRValue&);
00079   char  charValue()  const;             
00083   bool  boolValue()  const;             
00087   int intValue()  const;                
00091   float floatValue()  const;            
00095   skString str() const;
00099   skExecutable * obj()  const;
00103   RType type()  const;
00104  private:                                
00108   unsigned char m_Type;
00112   skString m_String;
00113   
00117   union {
00118     skObjectRef * m_ObjectRef;  
00119     char m_Char;
00120     int m_Int;
00121     float m_Float;
00122     bool m_Bool;
00123   }m_Value;
00124 };                              
00125 
00126 #endif
00127 
00128 

Generated at Mon Mar 5 16:00:30 2001 for Simkin by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000