|
|
||||||
|
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">
<Parameter name="Arg1" ftype="Integer" access="In">
<Parameter name="Arg2" ftype="Integer" access="In">
<Parameter name="Res" ftype="Integer" access="Out" creturn="true">
</Signature>
<Signature name="Three arguments">
<Parameter name="Arg1" ftype="Integer" access="In">
<Parameter name="Arg2" ftype="Integer" access="In">
<Parameter name="Arg3" ftype="Integer" access="In">
<Parameter name="Res" ftype="Integer" access="Out" creturn="true">
</Signature>
</VariantSignatures>
const std::string & Keywords(void) const Definition: cfl_types.cpp:401 Definition at line 416 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 356 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 364 of file cfl_functions.cpp. ◆ ~FunctionDefinition()
Destructor. Definition at line 443 of file cfl_functions.h. Member Function Documentation◆ AppendVariant()
◆ Clear()
Clear documentation-data and signature (keep prototype) Reimplemented from faudes::Type. Reimplemented in faudes::LuaFunctionDefinition. Definition at line 397 of file cfl_functions.cpp. ◆ ClearVariants()
Clear variants (keep docu and prototype) Definition at line 407 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 1038 of file cfl_functions.h. ◆ DoAssign()
Std faudes type interface: assignment.
Definition at line 372 of file cfl_functions.cpp. ◆ DoEqual()
Std faudes type interface: test equality.
Definition at line 388 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 497 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 510 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 529 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 538 of file cfl_functions.cpp. ◆ ExistsVariant()
Test existence of variant by its name.
Definition at line 446 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 1055 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 433 of file cfl_functions.cpp. ◆ Prototype() [1/2]
Assign prototype object.
Reimplemented in faudes::LuaFunctionDefinition. Definition at line 421 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 416 of file cfl_functions.cpp. ◆ Variant() [1/2]
Return reference to Signature by name.
Definition at line 473 of file cfl_functions.cpp. ◆ Variant() [2/2]
Return reference to Signature by index.
Definition at line 485 of file cfl_functions.cpp. ◆ VariantIndex()
Return index of Signature by name.
Definition at line 451 of file cfl_functions.cpp. ◆ VariantsSize()
Return number of supported Signature instances.
Definition at line 441 of file cfl_functions.cpp. Member Data Documentation◆ mpFunction
Prototype instance. Definition at line 669 of file cfl_functions.h. ◆ mVariantIndexMap
Variant name to index map. Definition at line 675 of file cfl_functions.h. ◆ mVariants
Vector containing all supported Signatures. Definition at line 672 of file cfl_functions.h. The documentation for this class was generated from the following files: libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen |