SmartFoxServer 2X C++ API
MMORoom.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of MMORoom
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2013 First version
9 //
10 // ===================================================================
11 #ifndef __MMORoom__
12 #define __MMORoom__
13 
14 #include "../Util/Common.h"
15 #include "IMMOItem.h"
16 #include "SFSRoom.h"
17 #include "Data/Vec3D.h"
18 
19 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
20 #include <boost/enable_shared_from_this.hpp> // Boost shared_ptr for this
21 
22 #if defined(_MSC_VER)
23 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
24 #endif
25 #include <string> // STL library: string object
26 #include <vector> // STL library: vector object
27 #include <map> // STL library: map object
28 using namespace std; // STL library: declare the STL namespace
29 
30 using namespace Sfs2X::Entities::Data;
31 
32 namespace Sfs2X {
33 namespace Entities {
34 
62  class DLLImportExport MMORoom : public SFSRoom
63  {
64  public:
65 
66  // -------------------------------------------------------------------
67  // Public methods
68  // -------------------------------------------------------------------
69 
71  MMORoom (long int id, string name, string groupId);
72 
74  MMORoom (long int id, string name);
75 
77  virtual ~MMORoom();
78 
79  virtual void Dispose();
80 
86  boost::shared_ptr<Vec3D> DefaultAOI();
87  void DefaultAOI(boost::shared_ptr<Vec3D> value);
88 
98  boost::shared_ptr<Vec3D> LowerMapLimit();
99  void LowerMapLimit(boost::shared_ptr<Vec3D> value);
100 
110  boost::shared_ptr<Vec3D> HigherMapLimit();
111  void HigherMapLimit(boost::shared_ptr<Vec3D> value);
112 
124  boost::shared_ptr<IMMOItem> GetMMOItem(long int id);
125 
131  boost::shared_ptr<vector<boost::shared_ptr<IMMOItem> > > GetMMOItems();
132 
134  void AddMMOItem(boost::shared_ptr<IMMOItem> item);
135 
137  void RemoveItem(long int id);
138 
139  // -------------------------------------------------------------------
140  // Public members
141  // -------------------------------------------------------------------
142 
143  protected:
144 
145  // -------------------------------------------------------------------
146  // Protected methods
147  // -------------------------------------------------------------------
148 
149  // -------------------------------------------------------------------
150  // Protected members
151  // -------------------------------------------------------------------
152 
153  private:
154 
155  // -------------------------------------------------------------------
156  // Private methods
157  // -------------------------------------------------------------------
158 
159  // -------------------------------------------------------------------
160  // Private members
161  // -------------------------------------------------------------------
162  boost::shared_ptr<Vec3D> defaultAOI;
163  boost::shared_ptr<Vec3D> lowerMapLimit;
164  boost::shared_ptr<Vec3D> higherMapLimit;
165  boost::shared_ptr<map<long int, boost::shared_ptr<IMMOItem> > > itemsById;
166  };
167 
168 } // namespace Entities
169 } // namespace Sfs2X
170 
171 #endif
The Room object represent a server Room.
Definition: SFSRoom.h:56
STL namespace.
The MMORoom object represents a specialized type of Room entity on the client.
Definition: MMORoom.h:62
Definition: SmartFox.cpp:24
Definition: ISFSArray.h:17