ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::expressions::CompilerPlugin::CIFunction Struct Reference

Description:

Info struct for compiling expression identifiers and functions. This struct is used with method TryCompilation(CIFunction&) to provide information to derived compiler plug-ins, as well as to receive information back.

Definition at line 185 of file compilerplugin.inl.

Inheritance diagram for alib::expressions::CompilerPlugin::CIFunction:
[legend]
Collaboration diagram for alib::expressions::CompilerPlugin::CIFunction:
[legend]

Public Field Index:

bool AllArgsAreConst
 
List< MonoAllocator, String > & FunctionsWithNonMatchingArguments
 
bool IsIdentifier
 
AStringName
 Input: The identifier name to search.
 
- Public Field Index: inherited from alib::expressions::CompilerPlugin::CompilationInfo
ArgIterator ArgsBegin
 
ArgIterator ArgsEnd
 
CallbackDecl Callback = nullptr
 Output: The native C++ callback function to be set by one of the plug-ins.
 
MonoAllocatorCompileTimeAllocator
 
ScopeCompileTimeScope
 
const ncharDbgCallbackName = nullptr
 
Box TypeOrValue = nullptr
 

Public Method Index:

 CIFunction (Scope &scope, MonoAllocator &compileTimeAllocator, AString &name, bool isIdentifier, bool argsAreConst, List< MonoAllocator, String > &hints)
 
void AddFunctionsWithNonMatchingArguments (const String &signature)
 
BoxArg (size_t no)
 
size_t QtyArgs ()
 
- Public Method Index: inherited from alib::expressions::CompilerPlugin::CompilationInfo
 CompilationInfo (Scope &scope, MonoAllocator &allocator)
 

Field Details:

◆ AllArgsAreConst

bool alib::expressions::CompilerPlugin::CIFunction::AllArgsAreConst

Input: Denotes if all arguments provided are constant values. Operator callbacks that do not use context information from the scope, should calculate the then constant result and return this value instead of the callback method. (Compile-time optimization.)

Definition at line 199 of file compilerplugin.inl.

◆ FunctionsWithNonMatchingArguments

List<MonoAllocator, String>& alib::expressions::CompilerPlugin::CIFunction::FunctionsWithNonMatchingArguments

A plug-in may add names of functions that matched, while the arguments did not. This will be stored in the details of a potential exception, if no other plug-in compiles this function and may be displayed to the end-user.

To add entries here, convenience method AddFunctionsWithNonMatchingArguments is provided.

Definition at line 207 of file compilerplugin.inl.

◆ IsIdentifier

bool alib::expressions::CompilerPlugin::CIFunction::IsIdentifier

Input: If the function was given as a pure "identifier" this flag is true.

See also
See also flag AllowOmittingParenthesesOfParameterlessFunctions of field
See also alib::expressions::Compiler::CfgCompilation. "Compiler::CfgCompilation.".

Definition at line 194 of file compilerplugin.inl.

◆ Name

AString& alib::expressions::CompilerPlugin::CIFunction::Name

Input: The identifier name to search.

Definition at line 188 of file compilerplugin.inl.

Constructor(s) / Destructor Details:

◆ CIFunction()

alib::expressions::CompilerPlugin::CIFunction::CIFunction ( Scope & scope,
MonoAllocator & compileTimeAllocator,
AString & name,
bool isIdentifier,
bool argsAreConst,
List< MonoAllocator, String > & hints )
inline

Constructor.

Parameters
scopePassed to parent.
compileTimeAllocatorPassed to parent.
nameStored in Name.
isIdentifierStored in IsIdentifier.
argsAreConstPassed to AllArgsAreConst.
hintsStored in FunctionsWithNonMatchingArguments.

Definition at line 216 of file compilerplugin.inl.

Here is the call graph for this function:

Method Details:

◆ AddFunctionsWithNonMatchingArguments()

void alib::expressions::CompilerPlugin::CIFunction::AddFunctionsWithNonMatchingArguments ( const String & signature)
inline

Convenience method that adds creates a monotonically allocated copy of the given string and adds it to list FunctionsWithNonMatchingArguments.

Parameters
signatureThe function signature to add.

Definition at line 249 of file compilerplugin.inl.

◆ Arg()

Box & alib::expressions::CompilerPlugin::CIFunction::Arg ( size_t no)
inline

Returns the argument number no.

Parameters
noThe number of the argument requested.
Returns
A reference to the requested argument.

Definition at line 240 of file compilerplugin.inl.

◆ QtyArgs()

size_t alib::expressions::CompilerPlugin::CIFunction::QtyArgs ( )
inline

Returns the number of arguments given.

Returns
The number of arguments the function call requested.

Definition at line 232 of file compilerplugin.inl.


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