SmartFoxServer 2X C++ API
SFSGameSettings.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of SFSGameSettings
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __SFSGameSettings__
12 #define __SFSGameSettings__
13 
14 #include "../../Util/Common.h"
15 #include "../BaseRequest.h"
16 #include "../RoomSettings.h"
17 #include "../../Entities/Room.h"
18 #include "../../Entities/Data/ISFSObject.h"
19 #include "../../Entities/Match/MatchExpression.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 <string> // STL library: string object
28 using namespace std; // STL library: declare the STL namespace
29 
30 using namespace Sfs2X::Entities;
31 using namespace Sfs2X::Entities::Data;
32 using namespace Sfs2X::Entities::Match;
33 
34 namespace Sfs2X {
35 namespace Requests {
36 namespace Game {
37 
96  class DLLImportExport SFSGameSettings : public RoomSettings
97  {
98  public:
99 
100  // -------------------------------------------------------------------
101  // Public methods
102  // -------------------------------------------------------------------
103  SFSGameSettings(string name);
104  ~SFSGameSettings();
105 
109  bool IsPublic();
110 
114  void IsPublic(bool value);
115 
119  long int MinPlayersToStartGame();
120 
124  void MinPlayersToStartGame(long int value);
125 
129  boost::shared_ptr<list<boost::shared_ptr<User> > > InvitedPlayersUser();
130 
134  void InvitedPlayersUser(boost::shared_ptr<list<boost::shared_ptr<User> > > value);
135 
139  boost::shared_ptr<list<boost::shared_ptr<Buddy> > > InvitedPlayersBuddy();
140 
144  void InvitedPlayersBuddy(boost::shared_ptr<list<boost::shared_ptr<Buddy> > > value);
145 
149  boost::shared_ptr<list<string> > SearchableRooms();
150 
154  void SearchableRooms(boost::shared_ptr<list<string> > value);
155 
162  long int InvitationExpiryTime();
163 
170  void InvitationExpiryTime(long int value);
171 
175  bool LeaveLastJoinedRoom();
176 
180  void LeaveLastJoinedRoom(bool value);
181 
190  bool NotifyGameStarted();
191 
200  void NotifyGameStarted(bool value);
201 
209  boost::shared_ptr<MatchExpression> PlayerMatchExpression();
210 
218  void PlayerMatchExpression(boost::shared_ptr<MatchExpression> value);
219 
224  boost::shared_ptr<MatchExpression> SpectatorMatchExpression();
225 
230  void SpectatorMatchExpression(boost::shared_ptr<MatchExpression> value);
231 
235  boost::shared_ptr<ISFSObject> InvitationParams();
236 
240  void InvitationParams(boost::shared_ptr<ISFSObject> value);
241 
242  // -------------------------------------------------------------------
243  // Public members
244  // -------------------------------------------------------------------
245 
246  protected:
247 
248  // -------------------------------------------------------------------
249  // Protected methods
250  // -------------------------------------------------------------------
251 
252  // -------------------------------------------------------------------
253  // Protected members
254  // -------------------------------------------------------------------
255 
256  private:
257 
258  // -------------------------------------------------------------------
259  // Private methods
260  // -------------------------------------------------------------------
261 
262  // -------------------------------------------------------------------
263  // Private members
264  // -------------------------------------------------------------------
265  bool isPublic;
266  long int minPlayersToStartGame;
267  boost::shared_ptr<list<boost::shared_ptr<User> > > invitedPlayersUser;
268  boost::shared_ptr<list<boost::shared_ptr<Buddy> > > invitedPlayersBuddy;
269  boost::shared_ptr<list<string> > searchableRooms;
270  boost::shared_ptr<MatchExpression> playerMatchExpression;
271  boost::shared_ptr<MatchExpression> spectatorMatchExpression;
272  long int invitationExpiryTime;
273  bool leaveJoinedLastRoom;
274  bool notifyGameStarted;
275  boost::shared_ptr<ISFSObject> invitationParams;
276  };
277 
278 } // namespace Game
279 } // namespace Requests
280 } // namespace Sfs2X
281 
282 #endif
STL namespace.
Definition: BoolMatch.cpp:15
This class provides all the settings required to create an SFSGame(*).
Definition: SFSGameSettings.h:96
This class provides the Room settings that you can pass to a CreateRoomRequest
Definition: RoomSettings.h:60
Definition: Buddy.h:30
Definition: SmartFox.cpp:24
Definition: ISFSArray.h:17