ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Classes | Functions
aworx::lib::expressions::plugins Namespace Reference

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.

Classes

struct  Arithmetics
 
struct  AutoCast
 
struct  Calculus
 
struct  DateAndTime
 
struct  ElvisOperator
 
struct  Math
 
struct  Strings
 

Functions

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)
 

Function Documentation

◆ CBFormat()

ALIB_API Box aworx::lib::expressions::plugins::CBFormat ( Scope scope,
ArgIterator  args,
ArgIterator   
)

This is the callback method for string function Format(...), which formats an arbitrary amount of arguments according to a given format string.

The function is compile-time invokable.

Note
As an exclamation to the rule, this function is not defined in an anonymous namespace, but exposed through the C++ header file of this struct. The rationale for this is that the function this way can be called by other plug-ins as well.
Parameters
scopeThe scope.
argsThe single argument.
Returns
A boxed monomem::TMAString.

◆ CBToString()

ALIB_API Box aworx::lib::expressions::plugins::CBToString ( Scope scope,
ArgIterator  args,
ArgIterator   
)

This is the callback method for string function String(...), which converts an arbitrary amount of arguments of arbitrary type to a concatenated string.

The function is compile-time invokable.

Note
As an exclamation to the rule, this function is not defined in an anonymous namespace, but exposed through the C++ header file of this struct. The rationale for this is that the function is also used for auto-casting custom types to strings, which is performed with compiler plug-in plugins::AutoCast.
Parameters
scopeThe scope.
argsThe single argument.
Returns
A boxed monomem::TMAString.

◆ ToBoolean()

ALIB_API Box aworx::lib::expressions::plugins::ToBoolean ( Scope scope,
ArgIterator  args,
ArgIterator   
)

This is the callback method for function Boolean, which converts arbitrary types to boolean values. As an exclamation 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.

Parameters
scopeThe scope.
argsThe single argument.
Returns
The boxed boolean result.