ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Methods | List of all members
ExpressionRepository Class Referenceabstract

#include <compiler.hpp>

Inheritance diagram for ExpressionRepository:
[legend]

Class Description


An implementation of this abstract interface class may be attached to field Compiler::Repository to enable an automated the definition and retrieval of expression strings of nested expressions.

A default implementation, which uses typical ALib mechanics to define expression strings, is given with class StandardRepository.

More information about automated nested expressions and the use of this interface class is provided with manual chapter 10.5 Automated Named Expressions.

Definition at line 60 of file compiler.hpp.

Public Methods

virtual ~ExpressionRepository ()
 
virtual bool Get (const String &identifier, AString &target)=0
 

Constructor & Destructor Documentation

◆ ~ExpressionRepository()

virtual ~ExpressionRepository ( )
inlinevirtual

Virtual destructor.

Definition at line 64 of file compiler.hpp.

Member Function Documentation

◆ Get()

virtual bool Get ( const String identifier,
AString target 
)
pure virtual

This method is called during compilation of expressions in the case a named expression is not found by method Compiler::GetNamed.

Parameters
identifierThe name of the required expression.
[out]targetThe target to write the requested expression string to.
Returns
true, if the expression string could be retrieved, false otherwise. If true is returned and target is still empty, then the string is defined to be empty, which throws an exception on compilation.

Implemented in StandardRepository.


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