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

An unowned Translator collection for which lookups are done for each Translator, in reverse order, until a match is found. More...

#include "environment.hpp"

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

Public Member Functions

 Environment ()
virtual void GiveElements (Consumer &) const
virtual bool IsEmpty () const
void Push (Translator const &)
 Pushes an unowned Translator reference. More...
virtual bool Translate (Evaluation &, Operator const &) const
 Translates the Operator to an object that is then 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...

Private Types

typedef std::vector
< Translator const * > 
 A vector of non-owner Translator pointers. More...

Private Attributes

TranslatorVector thisTranslatorVector

Detailed Description

Definition at line 32 of file environment.hpp.

Member Typedef Documentation

typedef std::vector<Translator const *> Om::Language::Environment::TranslatorVector

When looking up an Operator, the back Translator is used first. This requires the reverse iteration functionality provided by std::vector.

Definition at line 64 of file environment.hpp.

Constructor & Destructor Documentation

Om::Language::Environment::Environment ( )

Member Function Documentation

virtual void Om::Language::Environment::GiveElements ( Consumer ) const
virtual bool Om::Language::Environment::IsEmpty ( ) const
void Om::Language::Environment::Push ( Translator const &  )

If the given Translator is already the last reference in the Environment, there is no change.

virtual bool Om::Language::Environment::Translate ( Evaluation ,
Operator const &   
) const
True if the Operator was found.

Implements Om::Language::Translator.

Member Data Documentation

TranslatorVector Om::Language::Environment::thisTranslatorVector

Definition at line 68 of file environment.hpp.

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