NDEVR
API Documentation
RandomMessageGenerator.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Buffer.h>
4#include <NDEVR/TranslatedString.h>
5namespace NDEVR
6{
13 class NDEVR_DESIGN_API RandomMessageGenerator
14 {
15 public:
21
26 void addAll(const RandomMessageGenerator& messages);
27
33
38 void addMessage(const TranslatedString& message);
39
40 private:
41 Buffer<TranslatedString> m_random_messages;
42 };
43}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Stores a collection of translated messages and provides random selection from them.
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 RandomMessageGenerator & Default()
Returns the singleton default RandomMessageGenerator instance.
void addAll(const RandomMessageGenerator &messages)
Appends all messages from another RandomMessageGenerator into this one.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.