|
Om
|
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 * > | TranslatorVector |
| A vector of non-owner Translator pointers. More... | |
Private Attributes | |
| TranslatorVector | thisTranslatorVector |
Definition at line 32 of file environment.hpp.
|
private |
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.
| Om::Language::Environment::Environment | ( | ) |
|
virtual |
Implements Om::Language::Translator.
|
virtual |
Implements Om::Language::Translator.
| void Om::Language::Environment::Push | ( | Translator const & | ) |
If the given Translator is already the last reference in the Environment, there is no change.
|
virtual |
Implements Om::Language::Translator.
|
private |
Definition at line 68 of file environment.hpp.