Om
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:

Classes

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

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

Definition at line 106 of file system.hpp.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Referenced by main().

+ Here is the caller graph for this function:

Lexicon const& Om::Language::System::GetLexicon ( ) const
Returns
The Lexicon representation of the System.
virtual void Om::Language::System::GiveElements ( Consumer ) const
virtual
void Om::Language::System::Initialize ( char const  theLocaleCodeUnitIterator[])
Parameters
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:

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

Implements Om::Language::Translator.

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

Member Data Documentation

Map Om::Language::System::thisMap
private

Definition at line 116 of file system.hpp.


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