nw::LocString

struct LocString

Public Types

using LocStringPair = std::pair<uint32_t, String>
using Storage = Vector<LocStringPair>
using size_type = Storage::size_type
using iterator = Storage::iterator
using const_iterator = Storage::const_iterator

Public Functions

explicit LocString(uint32_t strref = std::numeric_limits<uint32_t>::max())
LocString(const LocString&) = default
LocString(LocString&&) = default
bool add(LanguageID language, StringView str, bool feminine = false)

Add a localized string.

String get(LanguageID language, bool feminine = false) const

Gets a localized string.

bool contains(LanguageID language, bool feminine = false) const

Determines if a localized string is set.

void remove(LanguageID language, bool feminine = false)

Removes a localized string.

void set_strref(uint32_t strref)

Sets string reference.

size_type size() const

Gets number of localized strings.

uint32_t strref() const

Gets string reference.

iterator begin()

Iterators.

iterator end()
const_iterator begin() const
const_iterator end() const
LocString &operator=(const LocString&) = default

Operators.

LocString &operator=(LocString&&) = default
bool operator==(const LocString &other) const