11 #ifndef __BaseVariable__ 12 #define __BaseVariable__ 15 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug 20 #include "../../Util/Common.h" 22 #include "VariableType.h" 23 #include "../Data/ISFSObject.h" 24 #include "../Data/ISFSArray.h" 25 #include "../Data/SFSArray.h" 26 #include "../Data/SFSObject.h" 27 #include "../../Exceptions/SFSError.h" 29 #include <boost/shared_ptr.hpp> 64 BaseVariable(
string name, boost::shared_ptr<void> val,
long int type);
74 BaseVariable(
string name, boost::shared_ptr<long int> val);
75 BaseVariable(
string name, boost::shared_ptr<unsigned long int> val);
77 BaseVariable(
string name, boost::shared_ptr<unsigned int> val);
79 BaseVariable(
string name, boost::shared_ptr<double> val);
80 BaseVariable(
string name, boost::shared_ptr<string> val);
81 BaseVariable(
string name, boost::shared_ptr<SFSObject> val);
82 BaseVariable(
string name, boost::shared_ptr<SFSArray> val);
87 virtual boost::shared_ptr<string> Name();
90 virtual VariableType Type();
93 virtual boost::shared_ptr<void> Value();
96 virtual boost::shared_ptr<bool> GetBoolValue();
99 virtual boost::shared_ptr<long int> GetIntValue();
102 virtual boost::shared_ptr<double> GetDoubleValue();
105 virtual boost::shared_ptr<string> GetStringValue();
108 virtual boost::shared_ptr<ISFSObject> GetSFSObjectValue();
111 virtual boost::shared_ptr<ISFSArray> GetSFSArrayValue();
114 virtual bool IsNull();
116 virtual boost::shared_ptr<ISFSArray> ToSFSArray();
118 boost::shared_ptr<string> TypeAsString();
119 boost::shared_ptr<string> ValueAsString();
141 void PopulateArrayWithValue(boost::shared_ptr<ISFSArray> arr);
142 void SetValue(boost::shared_ptr<long int> val);
143 void SetValue(boost::shared_ptr<unsigned long int> val);
144 void SetValue(boost::shared_ptr<int> val);
145 void SetValue(boost::shared_ptr<unsigned int> val);
146 void SetValue(boost::shared_ptr<bool> val);
147 void SetValue(boost::shared_ptr<double> val);
148 void SetValue(boost::shared_ptr<string> val);
149 void SetValue(boost::shared_ptr<SFSObject> val);
150 void SetValue(boost::shared_ptr<SFSArray> val);
157 boost::shared_ptr<string> name;
163 boost::shared_ptr<void> val;
The Variable interface defines all the default public methods and properties that an object represent...
Definition: Variable.h:25
The BaseVariable object is the base class for all SmartFoxServer Variable entities on the client...
Definition: BaseVariable.h:47
Definition: SmartFox.cpp:24