Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
GettextPluralForm Class Referenceabstract

#include <gettext_plural_form.h>

+ Inheritance diagram for GettextPluralForm:

Public Types

using NumT = unsigned long
 
using Ptr = std::shared_ptr<GettextPluralForm>
 

Public Member Functions

size_t size () const
 
virtual NumT operator() (const NumT) const =0
 
virtual operator bool () const
 
virtual ~GettextPluralForm ()
 

Static Public Member Functions

static GettextPluralForm::Ptr parse (const size_t nplurals, const std::wstring_view &str)
 
static GettextPluralForm::Ptr parseHeaderLine (const std::wstring_view &str)
 

Protected Member Functions

 GettextPluralForm (size_t nplurals)
 

Private Attributes

const size_t nplurals
 

Member Typedef Documentation

◆ NumT

using GettextPluralForm::NumT = unsigned long

◆ Ptr

using GettextPluralForm::Ptr = std::shared_ptr<GettextPluralForm>

Constructor & Destructor Documentation

◆ ~GettextPluralForm()

virtual GettextPluralForm::~GettextPluralForm ( )
inlinevirtual

◆ GettextPluralForm()

GettextPluralForm::GettextPluralForm ( size_t nplurals)
inlineprotected

Member Function Documentation

◆ operator bool()

virtual GettextPluralForm::operator bool ( ) const
inlinevirtual

References size().

+ Here is the call graph for this function:

◆ operator()()

virtual NumT GettextPluralForm::operator() ( const NumT ) const
pure virtual

◆ parse()

GettextPluralForm::Ptr GettextPluralForm::parse ( const size_t nplurals,
const std::wstring_view & str )
static

References nplurals, and parse_expr().

Referenced by parseHeaderLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseHeaderLine()

GettextPluralForm::Ptr GettextPluralForm::parseHeaderLine ( const std::wstring_view & str)
static

References nplurals, parse(), str_ends_with(), and str_starts_with().

Referenced by Translations::loadMoTranslation(), Translations::loadPoTranslation(), and TEST_CASE().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

size_t GettextPluralForm::size ( ) const
inline

References nplurals.

Referenced by operator bool().

+ Here is the caller graph for this function:

Member Data Documentation

◆ nplurals

const size_t GettextPluralForm::nplurals
private

Referenced by parse(), parseHeaderLine(), and size().


The documentation for this class was generated from the following files: