Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Om::Language::System Class Reference

Translates an Operator to an Operation. More...

#include "system.hpp"

+ Inheritance diagram for Om::Language::System:
+ Collaboration diagram for Om::Language::System:


class  Definition
 An inserter of an Operation into the static System instance. More...

Public Member Functions

Lexicon const & GetLexicon () const
virtual void GiveElements (Consumer &) const
void Initialize (char const theLocaleCodeUnitIterator[])
 Initializes the System. More...
virtual bool IsEmpty () const
virtual bool Translate (Evaluation &, Operator const &) const
 If there is an Operation mapped to the Operator, its implementation is given to the Evaluation. More...
- Public Member Functions inherited from Om::Language::Translator
void Evaluate (Om::Source::Source< CodePoint const > &, Om::Sink::Sink< CodePoint const > &) const
 Evaluates input from the CodePoint Source and pushes it to the CodePoint Sink. More...
std::string Evaluate (char const theCodeUnitIterator[]) const
 A convenience overload that evaluates input from the string and returns the output string. More...

Static Public Member Functions

static SystemGet ()

Private Types

typedef std::map< std::string, void(*)(Evaluation &) > Map
 Maps the name to a function that gives the Operation with this name to the Evaluation. More...

Private Member Functions

 System ()
 System (System const &)
System const & operator= (System const &)

Private Attributes

Map thisMap

Detailed Description

There is a single System instance, returned by the static Get() method.

Definition at line 48 of file system.hpp.

Member Typedef Documentation

◆ Map

typedef std::map< std::string, void (*)(Evaluation &) > Om::Language::System::Map

Definition at line 106 of file system.hpp.

Constructor & Destructor Documentation

◆ System() [1/2]

Om::Language::System::System ( )

◆ System() [2/2]

Om::Language::System::System ( System const &  )

Member Function Documentation

◆ Get()

static System& Om::Language::System::Get ( )
The static instance.

Referenced by main().

+ Here is the caller graph for this function:

◆ GetLexicon()

Lexicon const& Om::Language::System::GetLexicon ( ) const
The Lexicon representation of the System.

◆ GiveElements()

virtual void Om::Language::System::GiveElements ( Consumer ) const

◆ Initialize()

void Om::Language::System::Initialize ( char const  theLocaleCodeUnitIterator[])
theLocaleCodeUnitIteratorThe null-terminated locale string (e.g. en_US.UTF-8). The locale must use UTF-8 encoding.

Initializes the global locale to en_US.UTF-8 (using boost::locale) and asserts that all name keys in the System are NFD-normalized. This must be called in main, prior to any Program evaluation.

Referenced by main().

+ Here is the caller graph for this function:

◆ IsEmpty()

virtual bool Om::Language::System::IsEmpty ( ) const

◆ Translate()

virtual bool Om::Language::System::Translate ( Evaluation ,
Operator const &   
) const
False if there is no Operation mapped to the Operator.

Implements Om::Language::Translator.

◆ operator=()

System const& Om::Language::System::operator= ( System const &  )

Member Data Documentation

◆ thisMap

Map Om::Language::System::thisMap

Definition at line 116 of file system.hpp.

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