00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ZEITGEIST_GCVALUE_H
00024 #define ZEITGEIST_GCVALUE_H
00025
00026 #include <zeitgeist/scriptserver/rubywrapper.h>
00027
00028 namespace zeitgeist
00029 {
00040 class GCValue
00041 {
00042 public:
00043 GCValue();
00044 GCValue(const GCValue& value);
00045 GCValue(VALUE v);
00046
00048 GCValue(bool b);
00049
00051 GCValue(const std::string& str);
00052
00054 GCValue(const char* str);
00055
00057 GCValue(float f);
00058
00060 GCValue(int i);
00061
00062 ~GCValue();
00063
00064 void operator = (const GCValue& value);
00065 void operator = (const VALUE& value);
00066
00068 VALUE Get();
00069
00073 void Set(VALUE v);
00074
00076 bool IsNil();
00077
00081 bool GetInt(int& value);
00082
00086 bool GetFloat(float& value);
00087
00091 bool GetBool(bool& value);
00092
00096 bool GetString(std::string& value);
00097
00098 protected:
00102 void GC_Unregister();
00103
00107 void GC_Register();
00108
00109 protected:
00111 VALUE mValue;
00112 };
00113
00114 }
00115
00116 #endif // ZEITGEIST_GCVALUE_H