SmartFoxServer 2X C++ API
Variable.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of Variable interface
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2016 First version
9 //
10 // ===================================================================
11 #ifndef __Variable__
12 #define __Variable__
13 
14 #include "VariableType.h"
15 #include "../Data/ISFSArray.h"
16 #include "../Data/ISFSObject.h"
17 
18 namespace Sfs2X {
19  namespace Entities {
20  namespace Variables {
21 
25  class DLLImportExport Variable
26  {
27  public:
28 
32  virtual boost::shared_ptr<string> Name() = 0;
33 
39  virtual VariableType Type() = 0;
40 
44  virtual boost::shared_ptr<void> Value() = 0;
45 
51  virtual boost::shared_ptr<bool> GetBoolValue() = 0;
52 
58  virtual boost::shared_ptr<long int> GetIntValue() = 0;
59 
65  virtual boost::shared_ptr<double> GetDoubleValue() = 0;
66 
72  virtual boost::shared_ptr<string> GetStringValue() = 0;
73 
81  virtual boost::shared_ptr<ISFSObject> GetSFSObjectValue() = 0;
82 
90  virtual boost::shared_ptr<ISFSArray> GetSFSArrayValue() = 0;
91 
97  virtual bool IsNull() = 0;
98 
100  virtual boost::shared_ptr<ISFSArray> ToSFSArray() = 0;
101  };
102 
103  } // namespace Variables
104  } // namespace Entities
105 } // namespace Sfs2X
106 
107 #endif
The Variable interface defines all the default public methods and properties that an object represent...
Definition: Variable.h:25
Definition: SmartFox.cpp:24