| |
|
||||||
|
|
|||||||
|
Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Protected Attributes |
List of all members
faudes::FunctionDefinition Class Reference Detailed DescriptionA FunctionDefinition defines the interface to a faudes-function. The latter consists of a descriptive name to identify the function and a list of Signatures the function can operate on. Technically, the class FunctionDefinition is derived from Documentation and thereby inherits members for additional documentation-data. Similar to Type and TypeDefinition, a FunctionDefinition uses a prototype object to provide the method NewFunction() which instantiates the corresponding Function object. FunctionDefinition inherits the token io interface from Type, however, the class is not intended to register as a faudes type. The token io format is demonstrated by the following example: <Documentation ref="integersum.html">
Returns the sum of integer arguments.
<VariantSignatures>
<Signature name="Two arguments">
</Signature>
<Signature name="Three arguments">
</Signature>
</VariantSignatures>
Definition cfl_types.h:1334 Definition cfl_functions.h:45 Definition cfl_functions.h:220 Definition at line 419 of file cfl_functions.h.
Constructor & Destructor Documentation◆ FunctionDefinition() [1/2]
Constructor The default constructor instantiates an invalid function definition without prototype. To construct a valid function definition, use the static Constructor() template function. Definition at line 358 of file cfl_functions.cpp. ◆ FunctionDefinition() [2/2]
Copy Constructor The copy constructor copies all members one-to-one, except for the prototype object. The latter is re-created using its factory function. Definition at line 366 of file cfl_functions.cpp. ◆ ~FunctionDefinition()
Destructor Definition at line 450 of file cfl_functions.h. Member Function Documentation◆ AppendVariant()
◆ Clear()
Clear documentation-data and signature (keep prototype) Reimplemented from faudes::Documentation. Reimplemented in faudes::LuaFunctionDefinition. Definition at line 399 of file cfl_functions.cpp. ◆ ClearVariants()
Clear variants (keep docu and prototype) Definition at line 409 of file cfl_functions.cpp. ◆ Constructor()
template<class T >
Construct empty FunctionDefinition object. The given template parameter denotes a Function class. Member variable (mpFunction) is set to a new instance of that class whereas the name is set as specified. No further documentation or signatures are recorded.
Definition at line 1046 of file cfl_functions.h. ◆ DoCopy()
Std faudes type interface: assignment.
Definition at line 374 of file cfl_functions.cpp. ◆ DoEqual()
Std faudes type interface: test equality
Definition at line 390 of file cfl_functions.cpp. ◆ DoRead()
Read configuration data of this object from TokenReader. Actual reading is done by DoReadCore. The section defaults to "FunctionDefinition", context ignored.
Reimplemented from faudes::Documentation. Reimplemented in faudes::LuaFunctionDefinition. Definition at line 499 of file cfl_functions.cpp. ◆ DoReadCore()
Read configuration data of this object from TokenReader. This method reads members only, it does not read the section.
Reimplemented from faudes::Documentation. Reimplemented in faudes::LuaFunctionDefinition. Definition at line 512 of file cfl_functions.cpp. ◆ DoWrite()
Write configuration data of this object to TokenWriter. The section defaults to "FunctionDefinition", context ignored.
Reimplemented from faudes::Documentation. Reimplemented in faudes::LuaFunctionDefinition. Definition at line 531 of file cfl_functions.cpp. ◆ DoWriteCore()
Write configuration data of this object to TokenWriter. This method writes plain member data, the section lables are not written.
Reimplemented from faudes::Documentation. Reimplemented in faudes::LuaFunctionDefinition. Definition at line 540 of file cfl_functions.cpp. ◆ ExistsVariant()
Test existence of variant by its name.
Definition at line 448 of file cfl_functions.cpp. ◆ FromFile()
template<class T >
Construct FunctionDefinition object and get name and docu from file. The member variable mpFunction is set to a new instance of class T. which must be derived from Function. The function name, any documentation as well as supported signatures are read from the specified file.
Definition at line 1063 of file cfl_functions.h. ◆ NewFunction()
Construct function on heap. Return pointer to new instance of assigned Function class. Note: If no prototype is installed, NULL is returned.
Definition at line 435 of file cfl_functions.cpp. ◆ Prototype() [1/2]
Copy prototype object
Reimplemented in faudes::LuaFunctionDefinition. Definition at line 423 of file cfl_functions.cpp. ◆ Prototype() [2/2]
Return pointer to function object prototype Note: this method is meant for inspection only, control over the prototype remains with the FunctionDefinition. Use NewFunction() to instantiate a new function object.
Definition at line 418 of file cfl_functions.cpp. ◆ Variant() [1/2]
Return reference to Signature by name.
Definition at line 475 of file cfl_functions.cpp. ◆ Variant() [2/2]
Return reference to Signature by index.
Definition at line 487 of file cfl_functions.cpp. ◆ VariantIndex()
Return index of Signature by name.
Definition at line 453 of file cfl_functions.cpp. ◆ VariantsSize()
Return number of supported Signature instances.
Definition at line 443 of file cfl_functions.cpp. Member Data Documentation◆ mpFunction
Prototype instance Definition at line 675 of file cfl_functions.h. ◆ mVariantIndexMap
Variant name to index map Definition at line 681 of file cfl_functions.h. ◆ mVariants
Vector containing all supported Signatures Definition at line 678 of file cfl_functions.h. The documentation for this class was generated from the following files: libFAUDES 2.34d --- 2026.03.11 --- c++ api documentaion by doxygen |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||