Photon C++ Client API
5.0.7.3
|
Public Member Functions | |
virtual | ~Room (void) |
Room (const Room &toCopy) | |
virtual Room & | operator= (const Room &toCopy) |
const Common::JString & | getName (void) const |
virtual nByte | getPlayerCount (void) const |
nByte | getMaxPlayers (void) const |
bool | getIsOpen (void) const |
nByte | getDirectMode (void) const |
const Common::Hashtable & | getCustomProperties (void) const |
bool | operator== (const Room &room) const |
virtual Common::JString & | toString (Common::JString &retStr, bool withTypes=false) const |
virtual Common::JString | toString (bool withTypes, bool withCustomProperties) const |
virtual JString & | toString (JString &retStr, bool withTypes=false) const=0 |
JString | toString (bool withTypes=false) const |
Public Member Functions inherited from ToString | |
virtual | ~ToString (void) |
virtual JString | typeToString (void) const |
JString | toString (bool withTypes=false) const |
Each visible room inside the list of rooms in a lobby of type LobbyType::DEFAULT is represented by an instance of this class.
The information that is available through the various getters is regularly updated by the server as long as the client is inside the lobby. It is not updated and information will become outdated while the client is inside of a room.
|
virtual |
Destructor.
Copy-Constructor: Creates a new instance that is a deep copy of the argument instance.
toCopy | The instance to copy. |
operator=.
Makes a deep copy of its right operand into its left operand.
This overwrites old data in the left operand.
Reimplemented in MutableRoom.
const JString & getName | ( | void | ) | const |
A rooms name is a unique identifier (per region and virtual appid) for a room/match.
It can be set set by the client on room creation as parameter of Client::opCreateRoom() or Client::opJoinOrCreateRoom().
The name can't be changed once the room is created.
|
virtual |
Reimplemented in MutableRoom.
nByte getMaxPlayers | ( | void | ) | const |
bool getIsOpen | ( | void | ) | const |
This does not affect listing in a lobby but joining a room will fail if it is not open.
If it is not open, then a room is excluded from random matchmaking.
Due to racing conditions, found matches might become closed even while you join them. Simply find another room in this scenario.
nByte getDirectMode | ( | void | ) | const |
This returns DirectMode::NONE, unless the client that created the room has set something else through RoomOptions::setDirectMode()
const Hashtable & getCustomProperties | ( | void | ) | const |
Read-only cache for those custom properties of a room, which have been included in the list of properties to show in lobby (see RoomOptions::setPropsListedInLobby() and MutableRoom::setPropsListedInLobby()).
A client can change the custom properties of the currently joined room through class MutableRoom. The initial custom properties of a room can be set through class RoomOptions.
bool operator== | ( | const Room & | room | ) | const |
|
virtual |
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
Implements ToString.
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
withTypes | set to true, to include type information in the generated string |
withCustomProperties | set to true, to include the custom properties in the generated string |
toString |
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
JString toString |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
withTypes | set to true, to include type information in the generated string |