Name of a data set option. This class allows storing the name of an option in multiple languages. More...
#include <arcane/core/CaseOptionEnum.h>
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. | |
| StringDictionary * | m_translations |
| Translations. | |
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.
| 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().
| Arcane::CaseOptionName::CaseOptionName | ( | const CaseOptionName & | rhs | ) |
Copy constructor.
Definition at line 45 of file CaseOptionEnum.cc.
References CaseOptionName(), m_translations, and m_true_name.
|
virtual |
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.
| tname | translation of the name |
| lang | language of the translation |
Definition at line 66 of file CaseOptionEnum.cc.
References m_translations, and name().
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().
|
inline |
Returns the true name (non-translated) of the option.
Definition at line 52 of file CaseOptionEnum.h.
References m_true_name.
|
private |
Translations.
Definition at line 66 of file CaseOptionEnum.h.
Referenced by addAlternativeNodeName(), CaseOptionName(), CaseOptionName(), name(), and ~CaseOptionName().
|
private |
Option name.
Definition at line 65 of file CaseOptionEnum.h.
Referenced by CaseOptionName(), CaseOptionName(), name(), and trueName().