Om
Public Member Functions | List of all members
Om::Language::Translator Class Referenceabstract

An Operator lookup for use by an Evaluator. More...

#include "translator.hpp"

+ Inheritance diagram for Om::Language::Translator:

Public Member Functions

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...
 
virtual void GiveElements (Consumer &) const =0
 
virtual bool IsEmpty () const =0
 
virtual bool Translate (Evaluation &, Operator const &) const =0
 Translates the Operator to an object that is then given to the Evaluation. More...
 

Detailed Description

Definition at line 62 of file translator.hpp.

Member Function Documentation

◆ Evaluate() [1/2]

void Om::Language::Translator::Evaluate ( Om::Source::Source< CodePoint const > &  ,
Om::Sink::Sink< CodePoint const > &   
) const

Referenced by main().

+ Here is the caller graph for this function:

◆ Evaluate() [2/2]

std::string Om::Language::Translator::Evaluate ( char const  theCodeUnitIterator[]) const
Parameters
theCodeUnitIteratorA non-null pointer to a null-terminated code unit array.
Returns
A string containing the output.

This form is implemented in terms of the other form.

◆ GiveElements()

virtual void Om::Language::Translator::GiveElements ( Consumer ) const
pure virtual

◆ IsEmpty()

virtual bool Om::Language::Translator::IsEmpty ( ) const
pure virtual

◆ Translate()

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

Implemented in Om::Language::System, Om::Language::Lexicon, and Om::Language::Environment.


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