SmartFoxServer 2X C++ API
Sfs2X::Entities::Managers::SFSUserManager Class Reference

Manages the local Users. More...

#include <SFSUserManager.h>

Inheritance diagram for Sfs2X::Entities::Managers::SFSUserManager:
Sfs2X::Entities::Managers::IUserManager

Public Member Functions

bool ContainsUserName (string userName)
 Checks if a specific User name exists in the local User list More...
 
bool ContainsUserId (long int userId)
 Checks if a specific User id exists in the local User list More...
 
bool ContainsUser (boost::shared_ptr< User > user)
 Checks if a specific User object exists in the local User list More...
 
boost::shared_ptr< UserGetUserByName (string userName)
 Get a User object from its name More...
 
boost::shared_ptr< UserGetUserById (long int userId)
 Get a User object from its id More...
 
long int UserCount ()
 Get the total number of Users More...
 
boost::shared_ptr< vector< boost::shared_ptr< User > > > GetUserList ()
 Get the full list of Users More...
 

Detailed Description

Manages the local Users.

The client side API only see the Users that are joined in the same Rooms of the current User.

Member Function Documentation

◆ ContainsUser()

bool Sfs2X::Entities::Managers::SFSUserManager::ContainsUser ( boost::shared_ptr< User user)
virtual

Checks if a specific User object exists in the local User list

Parameters
userPointer to an User instance
Returns
A boolean

Implements Sfs2X::Entities::Managers::IUserManager.

◆ ContainsUserId()

bool Sfs2X::Entities::Managers::SFSUserManager::ContainsUserId ( long int  userId)
virtual

Checks if a specific User id exists in the local User list

Parameters
userIdA long integer
Returns
A boolean

Implements Sfs2X::Entities::Managers::IUserManager.

◆ ContainsUserName()

bool Sfs2X::Entities::Managers::SFSUserManager::ContainsUserName ( string  userName)
virtual

Checks if a specific User name exists in the local User list

Parameters
userNameA string pointer
Returns
A boolean

Implements Sfs2X::Entities::Managers::IUserManager.

◆ GetUserById()

boost::shared_ptr< User > Sfs2X::Entities::Managers::SFSUserManager::GetUserById ( long int  userId)
virtual

Get a User object from its id

Parameters
userIdA long integer
Returns
Pointer to an User instance

Implements Sfs2X::Entities::Managers::IUserManager.

◆ GetUserByName()

boost::shared_ptr< User > Sfs2X::Entities::Managers::SFSUserManager::GetUserByName ( string  userName)
virtual

Get a User object from its name

Parameters
userNameA string pointer
Returns
Pointer to an User instance

Implements Sfs2X::Entities::Managers::IUserManager.

◆ GetUserList()

boost::shared_ptr< vector< boost::shared_ptr< User > > > Sfs2X::Entities::Managers::SFSUserManager::GetUserList ( )
virtual

Get the full list of Users

Returns
A vector of User pointers

Implements Sfs2X::Entities::Managers::IUserManager.

◆ UserCount()

long int Sfs2X::Entities::Managers::SFSUserManager::UserCount ( )
virtual

Get the total number of Users

Implements Sfs2X::Entities::Managers::IUserManager.