An entry of field Functions. Describes how the function is recognized and the callback function and return type for it.
Definition at line 301 of file calculus.hpp.
#include <calculus.hpp>
Public Field Index: | |
CallbackDecl | Callback |
const char * | DbgCallbackName |
Token | Descriptor |
The name, minimum length and letter case sensitivity of the function to recognize. | |
CTInvokable | IsCTInvokable |
Box * | ResultType |
Box ** | Signature |
size_t | SignatureLength |
See Signature for more information. | |
CallbackDecl Callback |
Callback function to add to the program. If nullptr
, field ResultType is used as both: a constant value added to the program and the result type!
Definition at line 326 of file calculus.hpp.
const char* DbgCallbackName |
The C++ name of the callback function (only available with debug-builds of the library. Use preprocessor macro CALCULUS_CALLBACK to provide this field together with field Callback. The macro selects to prune the name string in release compilations.
Definition at line 334 of file calculus.hpp.
Token Descriptor |
The name, minimum length and letter case sensitivity of the function to recognize.
Definition at line 304 of file calculus.hpp.
CTInvokable IsCTInvokable |
Denotes, if the callback function is allowed to be invoked on the Scope object used at compile-time. This scope object is of the same (eventually custom) type as the one for evaluation, however the evaluation-specific data is not set. If allowed, such invocation is performed, if all function arguments are constant and instead of the function, the result is returned.
Definition at line 353 of file calculus.hpp.
Box* ResultType |
The result type given as a pointer to a sample box.
nullptr
, this box changes its meaning from being just a sample that provides the return type of the callback function, to being the 'real' constant result value that the function represents. However, it is preferable, to implement such constant functions using field Calculus::ConstantIdentifiers Definition at line 345 of file calculus.hpp.
Box** Signature |
A pointer to list of pointers to sample boxes that describe the function signature. If nullptr
, then the function does not accept parameters (aka is an identifier).
To denote variadic parameters (similar to C/C++ ellipsis operator "..."
), either nullptr
or a void box may be given as the last array element. All prior provided boxes represent mandatory arguments, while the function accepts an arbitrary number of arguments of arbitrary types in addition.
The length of this list is given with field SignatureLength.
Definition at line 319 of file calculus.hpp.
size_t SignatureLength |
See Signature for more information.
Definition at line 322 of file calculus.hpp.