UserDatabase Class Reference
#include <UserDatabase.h>

Member Function Documentation
| void UserDatabase::addRemoteUser | ( | User * | remoteUser | ) | [static] |
The method adds a new User to the UserDatabase. It therefore checks if the User is already connected and adds the User to the remoteUserList if not.
- Parameters:
-
remoteUser pointer to the new User object
| void UserDatabase::cleanup | ( | ) | [static] |
Delete the local User object and call User::cleanup(). Call this method before WorldDatabase::cleanup().
| User * UserDatabase::getLocalUser | ( | ) | [static] |
| unsigned UserDatabase::getLocalUserId | ( | ) | [static] |
The method removes a User from the UserDatabase. It therefore gets the User by it's Id, removes it from the remoteUserList and deletes the User-object
- Parameters:
-
userId Id of the User to remove
| int UserDatabase::getNumberOfRemoteUsers | ( | ) | [static] |
The method returns the number of users currently registered in the system.
- Returns:
- number of connected users
| User * UserDatabase::getRemoteUserByIndex | ( | int | idx | ) | [static] |
The method returns the connected User which is on the passed index in the remoteUserList.
- Parameters:
-
idx the index in the remoteUserList
- Returns:
- user at the passed index of the remoteUserList, NULL if the index is out of bounds
| User * UserDatabase::getUserById | ( | unsigned | userId | ) | [static] |
The method returns the User with the passed Id if it is registered in the UserDatabase.
- Parameters:
-
userId the Id of the searched User
| void UserDatabase::init | ( | ) | [static] |
The method registers the default CursorModelFactory (which is the VirtualHandCursorModel) in the User-class and creates a new User-object for the local user.
| CursorRepresentationInterface * UserDatabase::loadCursorRepresentation | ( | std::string | configFile | ) | [static, private] |
| void UserDatabase::registerCursorRepresentationFactory | ( | CursorRepresentationFactory * | factory | ) | [static] |
Registers an CursorRepresentationFactory in the UserDatabase. All registered CursorRepresentationFactory will be delete'd automatically when cleanup() is invoked
- Parameters:
-
factory CursorRepresentationFactory that should be added
| void UserDatabase::registerUserConnectCallback | ( | AbstractUserConnectCB & | callback | ) | [static] |
This method is used to register a callback which is triggered once a User is added to the UserDatabase
- Parameters:
-
callback the callback which is to be triggered
| void UserDatabase::registerUserDisconnectCallback | ( | AbstractUserDisconnectCB & | callback | ) | [static] |
This method is used to register a callback which is triggered once a User is removed from the UserDatabase.
- Parameters:
-
callback the callback which is to be registered
| void UserDatabase::removeRemoteUser | ( | unsigned | userId | ) | [static] |
Delete the local User object and call User::cleanup(). Call this method before WorldDatabase::cleanup().
| void UserDatabase::unregisterUserConnectCallback | ( | AbstractUserConnectCB & | callback | ) | [static] |
This method is used to unregister a callback which is triggered once a User is added to the UserDatabase.
- Parameters:
-
callback the callback which is to be unregistered
| void UserDatabase::unregisterUserDisconnectCallback | ( | AbstractUserDisconnectCB & | callback | ) | [static] |
This method is used to unregister a callback which is triggered once a User is removed from the UserDatabase.
- Parameters:
-
callback the callback which is to be unregistered
| void UserDatabase::updateCursors | ( | float | dt | ) | [static] |
Updates the cursors of all users
Friends And Related Function Documentation
friend class User [friend] |
Member Data Documentation
std::vector< CursorRepresentationFactory * > UserDatabase::cursorRepresentationFactories [static, private] |
XmlConfigurationLoader UserDatabase::cursorXmlConfigLoader [static, private] |
User * UserDatabase::localUser = NULL [static, private] |
std::vector< User * > UserDatabase::remoteUserList [static, private] |
std::vector< AbstractUserConnectCB * > UserDatabase::userConnectCallbacks [static, private] |
std::vector< AbstractUserDisconnectCB * > UserDatabase::userDisconnectCallbacks [static, private] |
The documentation for this class was generated from the following files:
- src/inVRs/SystemCore/UserDatabase/UserDatabase.h
- src/inVRs/SystemCore/UserDatabase/UserDatabase.cpp
Generated on Wed Oct 20 16:12:02 2010 for inVRs by
1.5.8