ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::expressions::plugins Namespace Reference

Description:

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.

Note
Sibling ALib module ALib Files , provides a compiler plug-in dedicated to file and directory trees.

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)
 

Function Details:

◆ CBFormat()

ALIB_API Box 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 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 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.