3#include <NDEVR/String.h>
4#include <NDEVR/Dictionary.h>
7 class TranslatedString;
53 template<
class t_type>
70 return static_cast<size_t>(s.translationID().hash());
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
The core String class for the NDEVR API.
Definition String.h:69
static TranslatedString DisplayString(const t_type &value)
Converts an object into a TranslatedString. To use this function an object must have overwritten Stri...
Definition TranslatedString.h:54
static void toDisplayString(const t_type &value, TranslatedString &string)
Logic for converting an object to an NDEVR API translated, user facing string. This allows the object...
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
TranslatedString & operator=(TranslatedString &&translation) noexcept
TranslatedString & replace(const String &sub_string, const TranslatedString &replacement)
bool operator==(const TranslatedString &translation) const
TranslatedString(const String &raw_string)
bool operator!=(const TranslatedString &translation) const
~TranslatedString()
Definition TranslatedString.h:16
String m_translation_id
Definition TranslatedString.h:48
TranslatedString(const TranslatedString &translation)
String translation(const String &translation_id) const
TranslatedString(const char *const raw_string)
String m_translation
Definition TranslatedString.h:50
bool isTranslatable() const
bool m_is_translated
Definition TranslatedString.h:51
void calculateEnglishString()
TranslatedString(TranslatedString &&translation) noexcept
const String & translationID() const
TranslatedString(const String &translation_id, const String &english)
TranslatedString & operator=(const TranslatedString &translation) noexcept
const String & translation() const
bool operator>(const TranslatedString &value) const
TranslatedString & replace(const String &sub_string, const String &replacement)
Dictionary< String, TranslatedString * > m_replacements
Definition TranslatedString.h:47
const String & englishTranslation() const
bool operator<(const TranslatedString &value) const
String internalValue() const
bool hasReplacements() const
String m_english_string
Definition TranslatedString.h:49
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233