Torc  0.1
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TorcStringFactory Class Referenceabstract

A factory class to register translatable strings for use with external interfaces/applications. More...

#include <torclanguage.h>

Inheritance diagram for TorcStringFactory:
[legend]

Public Member Functions

 TorcStringFactory ()
 
virtual ~TorcStringFactory ()=default
 
TorcStringFactoryNextFactory (void) const
 
virtual void GetStrings (QVariantMap &Strings)=0
 

Static Public Member Functions

static QVariantMap GetTorcStrings (void)
 Return a map of string constants and their translations. More...
 
static TorcStringFactoryGetTorcStringFactory (void)
 

Protected Attributes

TorcStringFactorynextTorcStringFactory
 

Static Protected Attributes

static TorcStringFactorygTorcStringFactory = nullptr
 

Detailed Description

A factory class to register translatable strings for use with external interfaces/applications.

A translatable string is registered with a string constant that should uniquely identify it. The list of registered constants and their current translations can be retrieved with GetTorcStrings.

Objects that wish to register strings should sub-class TorcStringFactory and implement GetStrings.

The string list is made available to web interfaces via the dynamically generated torcconfiguration.js file and is exported directly to all QML contexts.

Definition at line 66 of file torclanguage.h.

Constructor & Destructor Documentation

TorcStringFactory::TorcStringFactory ( )

Definition at line 522 of file torclanguage.cpp.

virtual TorcStringFactory::~TorcStringFactory ( )
virtualdefault

Member Function Documentation

virtual void TorcStringFactory::GetStrings ( QVariantMap &  Strings)
pure virtual
TorcStringFactory * TorcStringFactory::GetTorcStringFactory ( void  )
static

Definition at line 528 of file torclanguage.cpp.

QVariantMap TorcStringFactory::GetTorcStrings ( void  )
static

Return a map of string constants and their translations.

Definition at line 540 of file torclanguage.cpp.

TorcStringFactory * TorcStringFactory::NextFactory ( void  ) const

Definition at line 533 of file torclanguage.cpp.

Member Data Documentation

TorcStringFactory * TorcStringFactory::gTorcStringFactory = nullptr
staticprotected

Definition at line 79 of file torclanguage.h.

TorcStringFactory* TorcStringFactory::nextTorcStringFactory
protected

Definition at line 80 of file torclanguage.h.


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