FlightGear next
flightgear::TranslationDomain Class Reference

Class that holds translation resources within a domain. More...

#include <TranslationDomain.hxx>

Public Types

using ResourceRef = std::shared_ptr<TranslationResource>
 

Public Member Functions

ResourceRef getOrCreateResource (const std::string &resourceName)
 Get the specified TranslationResource instance.
 
ResourceRef getResource (const std::string &resourceName) const
 Get the specified TranslationResource instance.
 

Detailed Description

Class that holds translation resources within a domain.

This class is essentially a map from resource names (strings) to instances of std::shared_ptr<TranslationResource>.

Definition at line 27 of file TranslationDomain.hxx.

Member Typedef Documentation

◆ ResourceRef

Definition at line 30 of file TranslationDomain.hxx.

Member Function Documentation

◆ getOrCreateResource()

TranslationDomain::ResourceRef flightgear::TranslationDomain::getOrCreateResource ( const std::string & resourceName)

Get the specified TranslationResource instance.

Create, insert and return an empty one if there is no such resource yet.

Definition at line 20 of file TranslationDomain.cxx.

◆ getResource()

TranslationDomain::ResourceRef flightgear::TranslationDomain::getResource ( const std::string & resourceName) const

Get the specified TranslationResource instance.

Return an empty shared pointer if there is no such resource yet.

Definition at line 32 of file TranslationDomain.cxx.


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