Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::CaseOptionName Class Reference

Name of a data set option. This class allows storing the name of an option in multiple languages. More...

#include <arcane/core/CaseOptionEnum.h>

Inheritance diagram for Arcane::CaseOptionName:
Collaboration diagram for Arcane::CaseOptionName:

Public Member Functions

 CaseOptionName (const String &true_name)
 Constructs a name option true_name.
 CaseOptionName (const CaseOptionName &rhs)
 Copy constructor.
virtual ~CaseOptionName ()
 Releases resources.
String name (const String &lang) const
 returns the name of the option in the language lang. If no translation is available in the language lang, trueName() is returned.
String trueName () const
 Returns the true name (non-translated) of the option.
void addAlternativeNodeName (const String &lang, const String &tname)
 Adds a translation for the option name. Adds the name tname corresponding to the language lang. If a translation already exists for this language, it is replaced by this one.

Private Attributes

String m_true_name
 Option name.
StringDictionarym_translations
 Translations.

Detailed Description

Name of a data set option. This class allows storing the name of an option in multiple languages.

Definition at line 33 of file CaseOptionEnum.h.

Constructor & Destructor Documentation

◆ CaseOptionName() [1/2]

Arcane::CaseOptionName::CaseOptionName ( const String & true_name)

Constructs a name option true_name.

Definition at line 35 of file CaseOptionEnum.cc.

References m_translations, and m_true_name.

Referenced by Arcane::CaseOptionEnumValue::CaseOptionEnumValue(), and CaseOptionName().

Here is the caller graph for this function:

◆ CaseOptionName() [2/2]

Arcane::CaseOptionName::CaseOptionName ( const CaseOptionName & rhs)

Copy constructor.

Definition at line 45 of file CaseOptionEnum.cc.

References CaseOptionName(), m_translations, and m_true_name.

Here is the call graph for this function:

◆ ~CaseOptionName()

Arcane::CaseOptionName::~CaseOptionName ( )
virtual

Releases resources.

Definition at line 57 of file CaseOptionEnum.cc.

References m_translations.

Member Function Documentation

◆ addAlternativeNodeName()

void Arcane::CaseOptionName::addAlternativeNodeName ( const String & lang,
const String & tname )

Adds a translation for the option name. Adds the name tname corresponding to the language lang. If a translation already exists for this language, it is replaced by this one.

Parameters
tnametranslation of the name
langlanguage of the translation

Definition at line 66 of file CaseOptionEnum.cc.

References m_translations, and name().

Here is the call graph for this function:

◆ name()

String Arcane::CaseOptionName::name ( const String & lang) const

returns the name of the option in the language lang. If no translation is available in the language lang, trueName() is returned.

Definition at line 77 of file CaseOptionEnum.cc.

References m_translations, m_true_name, and Arcane::String::null().

Referenced by addAlternativeNodeName().

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

◆ trueName()

String Arcane::CaseOptionName::trueName ( ) const
inline

Returns the true name (non-translated) of the option.

Definition at line 52 of file CaseOptionEnum.h.

References m_true_name.

Member Data Documentation

◆ m_translations

StringDictionary* Arcane::CaseOptionName::m_translations
private

Translations.

Definition at line 66 of file CaseOptionEnum.h.

Referenced by addAlternativeNodeName(), CaseOptionName(), CaseOptionName(), name(), and ~CaseOptionName().

◆ m_true_name

String Arcane::CaseOptionName::m_true_name
private

Option name.

Definition at line 65 of file CaseOptionEnum.h.

Referenced by CaseOptionName(), CaseOptionName(), name(), and trueName().


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