Orxonox
0.0.5 Codename: Arcturus
|
This class collects and distributes chat messages. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/orxonox/chat/ChatManager.h>
Public Member Functions | |
ChatManager () | |
virtual | ~ChatManager ()=default |
Public Member Functions inherited from orxonox::NetworkChatListener | |
NetworkChatListener () | |
virtual | ~NetworkChatListener () |
Public Member Functions inherited from orxonox::Listable | |
Listable () | |
Constructor: Allocates space in the element list. More... | |
Listable (Context *context) | |
Constructor: Allocates space in the element list and assigns the context. More... | |
virtual | ~Listable () |
Destructor: Removes the object from the object-lists. More... | |
Context * | getContext () const |
void | setContext (Context *context) |
Changes the context. More... | |
void | unregisterObject () |
Removes this object from the object-lists. More... | |
Public Member Functions inherited from orxonox::Identifiable | |
Identifiable () | |
Constructor: Sets the default values. More... | |
virtual | ~Identifiable () |
ORX_FORCEINLINE void * | getDerivedPointer (unsigned int classID) |
Returns a valid pointer of any derived type that is registered in the class hierarchy. More... | |
template<class T > | |
ORX_FORCEINLINE T * | getDerivedPointer (unsigned int classID) |
Version of getDerivedPointer with template. More... | |
template<class T > | |
ORX_FORCEINLINE const T * | getDerivedPointer (unsigned int classID) const |
Const version of getDerivedPointer with template. More... | |
Identifier * | getIdentifier () const |
Returns the Identifier of the object. More... | |
bool | isA (const Identifier *identifier) |
Returns true if the object's class is of the given type or a derivative. More... | |
template<class B > | |
bool | isA (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is of the given type or a derivative. More... | |
bool | isA (const Identifiable *object) |
Returns true if the object's class is of the given type or a derivative. More... | |
bool | isChildOf (const Identifier *identifier) |
Returns true if the object's class is a child of the given type. More... | |
template<class B > | |
bool | isChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a child of the given type. More... | |
bool | isChildOf (const Identifiable *object) |
Returns true if the object's class is a child of the given type. More... | |
bool | isDirectChildOf (const Identifier *identifier) |
Returns true if the object's class is a direct child of the given type. More... | |
template<class B > | |
bool | isDirectChildOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isDirectChildOf (const Identifiable *object) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isDirectParentOf (const Identifier *identifier) |
Returns true if the object's class is a direct parent of the given type. More... | |
template<class B > | |
bool | isDirectParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a direct parent of the given type. More... | |
bool | isDirectParentOf (const Identifiable *object) |
Returns true if the object's class is a direct child of the given type. More... | |
bool | isExactlyA (const Identifier *identifier) |
Returns true if the object's class is exactly of the given type. More... | |
template<class B > | |
bool | isExactlyA (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is exactly of the given type. More... | |
bool | isExactlyA (const Identifiable *object) |
Returns true if the object's class is exactly of the given type. More... | |
bool | isParentOf (const Identifier *identifier) |
Returns true if the object's class is a parent of the given type. More... | |
template<class B > | |
bool | isParentOf (const SubclassIdentifier< B > *identifier) |
Returns true if the object's class is a parent of the given type. More... | |
bool | isParentOf (const Identifiable *object) |
Returns true if the object's class is a parent of the given type. More... | |
Static Public Member Functions | |
static void | chat (const std::string &message, unsigned int targetID=NETWORK_PEER_ID_BROADCAST) |
Sends a chat message with the client as its sender to the chat. More... | |
static void | message (const std::string &message, unsigned int targetID=NETWORK_PEER_ID_BROADCAST) |
Sends a message (usually gameplay related) without explicit sender to the chat. More... | |
Static Public Member Functions inherited from orxonox::Singleton< ChatManager > | |
static bool | exists () |
Tells whether the singleton has been created. More... | |
static ChatManager & | getInstance () |
Returns a reference to the singleton instance. More... | |
Protected Member Functions | |
ChatManager (const ChatManager &)=delete | |
virtual void | incomingChat (const std::string &message, unsigned int sourceID) override |
Inherited callback from NetworkChatListener, but gets also called directly by ChatManager itself if the client is offline. More... | |
ChatManager & | operator= (const ChatManager &)=delete |
Protected Member Functions inherited from orxonox::Singleton< ChatManager > | |
Singleton () | |
Constructor sets the singleton instance pointer. More... | |
virtual | ~Singleton () |
Destructor resets the singleton instance pointer. More... | |
Static Protected Attributes | |
static ChatManager * | singletonPtr_s |
Friends | |
class | Singleton< ChatManager > |
This class collects and distributes chat messages.
If the client is online, all chat messages are sent and received through the network. Otherwise chat is handled directly by this class.
orxonox::ChatManager::ChatManager | ( | ) |
|
virtualdefault |
|
protecteddelete |
|
static |
Sends a chat message with the client as its sender to the chat.
message | The message |
targetID | The client ID (network) of the receiver. Usually the broadcast ID |
|
overrideprotectedvirtual |
Inherited callback from NetworkChatListener, but gets also called directly by ChatManager itself if the client is offline.
Distributes an incoming chat message to all ChatListeners.
message | The message |
sourceID | The client ID (network) of the sender |
Implements orxonox::NetworkChatListener.
|
static |
Sends a message (usually gameplay related) without explicit sender to the chat.
message | The message |
targetID | The client ID (network) of the receiver. Usually the broadcast ID |
|
protecteddelete |
|
friend |
|
staticprotected |