SmartFoxServer 2X C++ API
|
The User interface defines all the methods and properties that an object representing a SmartFoxServer User entity exposes. More...
#include <User.h>
Public Member Functions | |
virtual long int | Id ()=0 |
Get the unique User Id More... | |
virtual boost::shared_ptr< string > | Name ()=0 |
The user name More... | |
virtual long int | PlayerId ()=0 |
Get the playerId of the User. More... | |
virtual bool | IsPlayer ()=0 |
Return true if the User is a Player (playerId > 0) in the last joined Room More... | |
virtual bool | IsSpectator ()=0 |
Return true if the User is a Spectator (playerId < 0) in the last joined Room More... | |
virtual long int | GetPlayerId (boost::shared_ptr< Room > room)=0 |
Return the playerId for the specific Room. More... | |
virtual long int | PrivilegeId ()=0 |
Get the privilegeId of the User More... | |
virtual void | PrivilegeId (long int value)=0 |
Get the privilegeId of the User More... | |
virtual boost::shared_ptr< IUserManager > | UserManager ()=0 |
Get the UserManager of this User More... | |
virtual void | UserManager (boost::shared_ptr< IUserManager > value)=0 |
Get the UserManager of this User More... | |
virtual bool | IsGuest ()=0 |
Return true if the User is logged in as guest user More... | |
virtual bool | IsStandardUser ()=0 |
Return true if the User is logged in as standard user More... | |
virtual bool | IsModerator ()=0 |
Return true if the User is logged in as moderator user More... | |
virtual bool | IsAdmin ()=0 |
Return true if the User is logged in as administrator user More... | |
virtual bool | IsPlayerInRoom (boost::shared_ptr< Room > room)=0 |
Return true if the User is a Player in the specified Room More... | |
virtual bool | IsSpectatorInRoom (boost::shared_ptr< Room > room)=0 |
Return true if the User is a Spectator in the specified Room More... | |
virtual bool | IsJoinedInRoom (boost::shared_ptr< Room > room)=0 |
Return true if the User is joined in the specified Room More... | |
virtual bool | IsItMe ()=0 |
Return true if the User object is the client's User object, also known as SmartFox.MySelf More... | |
virtual boost::shared_ptr< vector< boost::shared_ptr< UserVariable > > > | GetVariables ()=0 |
Get all the User Variables More... | |
virtual boost::shared_ptr< UserVariable > | GetVariable (string varName)=0 |
Get a UserVariable More... | |
virtual bool | ContainsVariable (string name)=0 |
Check if a UserVariable exists More... | |
virtual boost::shared_ptr< map< string, boost::shared_ptr< void > > > | Properties ()=0 |
A generic object that can be used to store any User custom data needed at runtime. More... | |
virtual void | Properties (boost::shared_ptr< map< string, boost::shared_ptr< void > > > value)=0 |
A generic object that can be used to store any User custom data needed at runtime. More... | |
virtual boost::shared_ptr< Vec3D > | AOIEntryPoint ()=0 |
Returns the entry point of this user in the current user's AoI. More... | |
virtual void | AOIEntryPoint (boost::shared_ptr< Vec3D >value)=0 |
Returns the entry point of this user in the current user's AoI. More... | |
The User interface defines all the methods and properties that an object representing a SmartFoxServer User entity exposes.
In the SmartFoxServer 2X client API this interface is implemented by the SFSUser class. Read the class description for additional informations.
|
pure virtual |
Returns the entry point of this user in the current user's AoI.
The returned coordinates are those that the user had when his presence in the current user's Area of Interest was last notified by a PROXIMITY_LIST_UPDATE event. This field is populated only if the user joined a Room of type MMORoom and this is configured to receive such data from the server.
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Returns the entry point of this user in the current user's AoI.
The returned coordinates are those that the user had when his presence in the current user's Area of Interest was last notified by a PROXIMITY_LIST_UPDATE event. This field is populated only if the user joined a Room of type MMORoom and this is configured to receive such data from the server.
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Check if a UserVariable exists
name | the name of the variable |
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return the playerId for the specific Room.
If you don't use multi-room you can use User.PlayerId
room | Pointer to a Room instance |
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Get a UserVariable
varName | the name of the variable |
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Get all the User Variables
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Get the unique User Id
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is logged in as administrator user
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is logged in as guest user
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User object is the client's User object, also known as SmartFox.MySelf
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is joined in the specified Room
room | Pointer to a Room instance |
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is logged in as moderator user
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is a Player (playerId > 0) in the last joined Room
Non game Rooms will always return false
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is a Player in the specified Room
room | Pointer to a Room instance |
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is a Spectator (playerId < 0) in the last joined Room
Non game Rooms will always return false
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is a Spectator in the specified Room
room | Pointer to a Room instance |
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Return true if the User is logged in as standard user
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
The user name
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
Get the playerId of the User.
The playerId is different from the User ID and it used to indicate which player number is the user inside a Game Room. Example: in a Game Room for 5 players the first client joining will have playerId = 1, the 2nd will have playerId = 2 and so forth. When a User leaves the Room its player slot is freed up and the next User joining the Room will take it.
The playerId is only applicable for Game Rooms, in the other Rooms it is always == 0 A playerId < 0 indicates that the User is a spectator.
If the User is joined in multiple game Rooms at the same time he will be assigned one playerId per Room. In order to obtain a specific playerId you can use the User.GetPlayerId(Room room)
method.
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
|
pure virtual |
|
pure virtual |
A generic object that can be used to store any User custom data needed at runtime.
The values added/removed in this object are for client side use only an are never transmitted to the Server.
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
A generic object that can be used to store any User custom data needed at runtime.
The values added/removed in this object are for client side use only an are never transmitted to the Server.
Implemented in Sfs2X::Entities::SFSUser.
|
pure virtual |
|
pure virtual |