![]() |
NDEVR
API Documentation
|
Stores a collection of translated messages and provides random selection from them. More...
Public Member Functions | |
| void | addAll (const RandomMessageGenerator &messages) |
| Appends all messages from another RandomMessageGenerator into this one. | |
| void | addMessage (const TranslatedString &message) |
| Adds a single translated message to the collection. | |
| TranslatedString | randomMessage () const |
| Selects and returns a random message from the stored collection. | |
Static Public Member Functions | |
| static RandomMessageGenerator & | Default () |
| Returns the singleton default RandomMessageGenerator instance. | |
Stores a collection of translated messages and provides random selection from them.
Used to display randomized tips, hints, or splash-screen messages to the user. A singleton instance is available via Default().
Definition at line 13 of file RandomMessageGenerator.h.
| void RandomMessageGenerator::addAll | ( | const RandomMessageGenerator & | messages | ) |
Appends all messages from another RandomMessageGenerator into this one.
| [in] | messages | The generator whose messages will be copied into this instance. |
| void RandomMessageGenerator::addMessage | ( | const TranslatedString & | message | ) |
Adds a single translated message to the collection.
| [in] | message | The translated message to add. |
|
static |
Returns the singleton default RandomMessageGenerator instance.
| TranslatedString RandomMessageGenerator::randomMessage | ( | ) | const |
Selects and returns a random message from the stored collection.