Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

VirtualBoxSupportTranslation< C > Class Template Reference

#include <VirtualBoxBase.h>

Inheritance diagram for VirtualBoxSupportTranslation< C >:


List of all members.

Detailed Description

template<class C>
class VirtualBoxSupportTranslation< C >

The VirtualBoxSupportTranslation template implements the NLS string translation support for the given class.

Translation support is provided by the static tr() function. This function, given a string in UTF-8 encoding, looks up for a translation of the given string by calling the VirtualBoxBase::translate() global function which receives the name of the enclosing class ("context of translation") as the additional argument and returns a translated string based on the currently active language.

C Class that needs to support the string translation.
Every class that wants to use the tr() function in its own methods must inherit from this template, regardless of whether its base class (if any) inherits from it or not. Otherwise, the translation service will not work correctly. However, the declaration of the derived class must contain the COM_SUPPORTTRANSLATION_OVERRIDE (<ClassName>) macro if one of its base classes also inherits from this template (to resolve the ambiguity of the tr() function).

Definition at line 1342 of file VirtualBoxBase.h.

Static Public Member Functions

static const char * tr (const char *aSourceText, const char *aComment=NULL)

Static Protected Member Functions

static const char * className ()
static bool cutClassNameFrom__PRETTY_FUNCTION__ (char *aPrettyFunctionName)

Static Private Attributes

static const char * sClassName = NULL

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

Generated by  Doxygen 1.6.0   Back to index