SmartFoxServer 2X C++ API
MMOItemVariable.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of MMOItemVariable
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2013 First version
9 //
10 // ===================================================================
11 #ifndef __MMOItemVariable__
12 #define __MMOItemVariable__
13 
14 #include "../../Util/Common.h"
15 #include "BaseVariable.h"
16 #include "IMMOItemVariable.h"
17 
18 namespace Sfs2X {
19 namespace Entities {
20 namespace Variables {
21 
34  class DLLImportExport MMOItemVariable : public BaseVariable, public IMMOItemVariable
35  {
36  public:
37 
38  // -------------------------------------------------------------------
39  // Public methods
40  // -------------------------------------------------------------------
41 
43  static boost::shared_ptr<IMMOItemVariable> FromSFSArray(boost::shared_ptr<ISFSArray> sfsa);
44 
46  MMOItemVariable(string name, boost::shared_ptr<void> val, long int type);
47 
49  MMOItemVariable(string name, boost::shared_ptr<long int> val);
50  MMOItemVariable(string name, boost::shared_ptr<unsigned long int> val);
51  MMOItemVariable(string name, boost::shared_ptr<int> val);
52  MMOItemVariable(string name, boost::shared_ptr<unsigned int> val);
53  MMOItemVariable(string name, boost::shared_ptr<bool> val);
54  MMOItemVariable(string name, boost::shared_ptr<double> val);
55  MMOItemVariable(string name, boost::shared_ptr<string> val);
56  MMOItemVariable(string name, boost::shared_ptr<SFSObject> val);
57  MMOItemVariable(string name, boost::shared_ptr<SFSArray> val);
58 
59  virtual ~MMOItemVariable();
60 
62  virtual boost::shared_ptr<string> Name();
63 
65  virtual VariableType Type();
66 
68  virtual boost::shared_ptr<void> Value();
69 
71  virtual boost::shared_ptr<bool> GetBoolValue();
72 
74  virtual boost::shared_ptr<long int> GetIntValue();
75 
77  virtual boost::shared_ptr<double> GetDoubleValue();
78 
80  virtual boost::shared_ptr<string> GetStringValue();
81 
83  virtual boost::shared_ptr<ISFSObject> GetSFSObjectValue();
84 
86  virtual boost::shared_ptr<ISFSArray> GetSFSArrayValue();
87 
89  virtual bool IsNull();
90 
91  virtual boost::shared_ptr<ISFSArray> ToSFSArray();
92 
100  boost::shared_ptr<string> ToString();
101 
102  // -------------------------------------------------------------------
103  // Public members
104  // -------------------------------------------------------------------
105 
106  protected:
107 
108  // -------------------------------------------------------------------
109  // Protected methods
110  // -------------------------------------------------------------------
111 
112  // -------------------------------------------------------------------
113  // Protected members
114  // -------------------------------------------------------------------
115 
116  private:
117 
118  // -------------------------------------------------------------------
119  // Private methods
120  // -------------------------------------------------------------------
121 
122  // -------------------------------------------------------------------
123  // Private members
124  // -------------------------------------------------------------------
125 
126  };
127 
128 } // namespace Variables
129 } // namespace Entities
130 } // namespace Sfs2X
131 
132 #endif
The BaseVariable object is the base class for all SmartFoxServer Variable entities on the client...
Definition: BaseVariable.h:47
The IMMOItemVariable interface defines all the public methods and properties that an object represent...
Definition: IMMOItemVariable.h:30
The MMOItemVariable object represents a SmartFoxServer MMOItem Variable entity on the client...
Definition: MMOItemVariable.h:34
Definition: SmartFox.cpp:24