SmartFoxServer 2X C++ API
SetRoomVariablesRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of SetRoomVariablesRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __SetRoomVariablesRequest__
12 #define __SetRoomVariablesRequest__
13 
14 #include "../Util/Common.h"
15 #include "BaseRequest.h"
16 #include "../Entities/Data/ISFSArray.h"
17 #include "../Entities/Data/SFSArray.h"
18 #include "../Entities/Room.h"
19 #include "../Entities/Variables/RoomVariable.h"
20 
21 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
22 
23 #if defined(_MSC_VER)
24 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
25 #endif
26 #include <list> // STL library: list object
27 #include <vector> // STL library: vector object
28 #include <string> // STL library: string object
29 using namespace std; // STL library: declare the STL namespace
30 
31 using namespace Sfs2X::Entities::Data;
32 
33 namespace Sfs2X {
34 namespace Requests {
35 
40  class DLLImportExport SetRoomVariablesRequest : public BaseRequest
41  {
42  public:
43 
44  // -------------------------------------------------------------------
45  // Public methods
46  // -------------------------------------------------------------------
47 
110  SetRoomVariablesRequest (boost::shared_ptr<vector<boost::shared_ptr<RoomVariable> > > roomVariables, boost::shared_ptr<Room> room);
111 
115  SetRoomVariablesRequest (boost::shared_ptr<vector<boost::shared_ptr<RoomVariable> > > roomVariables);
116 
117  virtual ~SetRoomVariablesRequest();
118 
119  void Validate(boost::shared_ptr<SmartFox> sfs);
120 
121  void Execute (boost::shared_ptr<SmartFox> sfs);
122 
123  // -------------------------------------------------------------------
124  // Public members
125  // -------------------------------------------------------------------
126 
127  static boost::shared_ptr<string> KEY_VAR_ROOM;
128 
129  static boost::shared_ptr<string> KEY_VAR_LIST;
130 
131  protected:
132 
133  // -------------------------------------------------------------------
134  // Protected methods
135  // -------------------------------------------------------------------
136 
137  // -------------------------------------------------------------------
138  // Protected members
139  // -------------------------------------------------------------------
140 
141  private:
142 
143  // -------------------------------------------------------------------
144  // Private methods
145  // -------------------------------------------------------------------
146  void Init (boost::shared_ptr<vector<boost::shared_ptr<RoomVariable> > > roomVariables, boost::shared_ptr<Room> room);
147 
148  // -------------------------------------------------------------------
149  // Private members
150  // -------------------------------------------------------------------
151  boost::shared_ptr<vector<boost::shared_ptr<RoomVariable> > > roomVariables;
152  boost::shared_ptr<Room> room;
153 
154  };
155 
156 } // namespace Requests
157 } // namespace Sfs2X
158 
159 #endif
STL namespace.
Set custom Room Variables in a Room
Definition: SetRoomVariablesRequest.h:40
Definition: SmartFox.cpp:24
Definition: ISFSArray.h:17