This inner namespace of module ALib Expressions contains the implementations of built-in compiler plug-ins.
In addition, helper-class Calculus is defined here, which is the foundation for most of the built-in functionality.
It is strongly recommended to use this helper-class for the creation of custom compiler plug-ins instead of deriving such from class CompilerPlugin directly.
Type Index: | |
struct | Arithmetics |
struct | AutoCast |
struct | Calculus |
struct | DateAndTime |
struct | ElvisOperator |
struct | Math |
struct | Strings |
Function Index: | |
ALIB_API Box | CBFormat (Scope &scope, ArgIterator args, ArgIterator) |
ALIB_API Box | CBToString (Scope &scope, ArgIterator args, ArgIterator) |
ALIB_API Box | ToBoolean (Scope &scope, ArgIterator args, ArgIterator) |
ALIB_API Box CBFormat | ( | Scope & | scope, |
ArgIterator | args, | ||
ArgIterator | ) |
This is the callback method for string function Format(...), which formats an arbitrary number of arguments according to a given format string.
The function is compile-time invokable.
scope | The scope. |
args | The single argument. |
ALIB_API Box CBToString | ( | Scope & | scope, |
ArgIterator | args, | ||
ArgIterator | ) |
This is the callback method for string function String(...), which converts an arbitrary number of arguments of arbitrary types to a concatenated string.
The function is compile-time invokable.
scope | The scope. |
args | The single argument. |
ALIB_API Box ToBoolean | ( | Scope & | scope, |
ArgIterator | args, | ||
ArgIterator | ) |
This is the callback method for function Boolean, which converts arbitrary types to boolean values. As an exception to the rule, this function is not defined in an anonymous namespace, but exposed through the header of struct plugins::Arithmetics. The rationale for this is that the function is also used for auto-casting custom types to boolean values, which is performed with compiler plug-in plugins::AutoCast.
The function is compile-time invokable and uses box-function FIsTrue to determine if a boxed value represents true
or false
.
scope | The scope. |
args | The single argument. |