#include <src/orxonox/overlays/notifications/Notification.h>
Public Member Functions | |
const std::string & | getMessage (void) const |
Returns the message of the Notification. | |
const std::string & | getSender (void) const |
bool | isSent (void) const |
Checks whether the Notification was sent. | |
Notification (const std::string &message) | |
Constructor. Creates a Notification with the input message. | |
Notification (BaseObject *creator) | |
Default constructor. Initializes the object. | |
bool | send (const std::string &sender) |
Sends the Notification to the Notificationmanager. | |
bool | send (void) |
Sends the Notification to the Notificationmanager, with sender NotificationManager::NONE;. | |
bool | setMessage (const std::string &message) |
Sets the message of the notification. | |
virtual | ~Notification () |
Destructor. | |
Private Member Functions | |
void | initialize (void) |
Registers the object and sets some default values. | |
Private Attributes | |
std::string | message_ |
The Notification message. | |
std::string | sender_ |
The sender of the notification. | |
bool | sent_ |
Whether Notification has been sent, if so it cannot be changed. |
orxonox::Notification::Notification | ( | BaseObject * | creator | ) |
orxonox::Notification::Notification | ( | const std::string & | message | ) |
Constructor. Creates a Notification with the input message.
message | The message of the Notification. |
References message_.
orxonox::Notification::~Notification | ( | ) | [virtual] |
Destructor.
const std::string& orxonox::Notification::getMessage | ( | void | ) | const [inline] |
Returns the message of the Notification.
Referenced by orxonox::NotificationOverlay::processNotification(), and send().
const std::string& orxonox::Notification::getSender | ( | void | ) | const [inline] |
Referenced by orxonox::NotificationManager::registerNotification().
void orxonox::Notification::initialize | ( | void | ) | [private] |
Registers the object and sets some default values.
Reimplemented in orxonox::QuestNotification.
References message_, orxonox::NotificationManager::NONE, sender_, and sent_.
Referenced by Notification().
bool orxonox::Notification::isSent | ( | void | ) | const [inline] |
Checks whether the Notification was sent.
Referenced by setMessage().
bool orxonox::Notification::send | ( | const std::string & | sender | ) |
Sends the Notification to the Notificationmanager.
Sends the Notification to the Notificationmanager, which then in turn distributes it to the different NotificationQueues.
sender | The sender the Notification was sent by. Used by the NotificationManager to distributes the notification to the correct NotificationQueues. |
References COUT, orxonox::NotificationManager::getInstance(), getMessage(), orxonox::NotificationManager::registerNotification(), sender_, and sent_.
bool orxonox::Notification::send | ( | void | ) |
Sends the Notification to the Notificationmanager, with sender NotificationManager::NONE;.
Sends the Notification to the Notificationmanager, with sender NetificationManager::NONE.
Reimplemented in orxonox::QuestNotification.
References orxonox::NotificationManager::NONE.
Referenced by orxonox::QuestNotification::send().
bool orxonox::Notification::setMessage | ( | const std::string & | message | ) |
std::string orxonox::Notification::message_ [private] |
std::string orxonox::Notification::sender_ [private] |
bool orxonox::Notification::sent_ [private] |
Whether Notification has been sent, if so it cannot be changed.
Referenced by initialize(), and send().