A List of function argument types (strings). This is not a vector or list container, but a mono-allocated array of arguments. Construction and allocation is done with the static method PARSE.
The names of the arguments are left pruned. Furthermore, few standardizations in respect to spacing are performed. This enables to easily identify whether a given XLink and a corresponding Target share the exact same parameters
Definition at line 81 of file target.hpp.
#include <target.hpp>
Public Static Method Index: | |
| static int | MATCH (FunctionArguments *linkArgs, FunctionArguments *targetArgs) |
| static FunctionArguments * | PARSE (alib::MonoAllocator &ma, alib::Substring &parser) |
Public Field Index: | |
| alib::String * | Arguments = nullptr |
| An array of length Count of strings. | |
| int | Count |
| The number of arguments. | |
Public Method Index: | |
| void | Print (alib::AString &dest) |
Protected Method Index: | |
| FunctionArguments ()=default | |
| Constructor. | |
| alib::String* dxl::Target::FunctionArguments::Arguments = nullptr |
An array of length Count of strings.
Definition at line 86 of file target.hpp.
| int dxl::Target::FunctionArguments::Count |
The number of arguments.
Definition at line 83 of file target.hpp.
|
static |
Tests if the arguments linkArgs of an XLink match the ones of a target. Not all the arguments need to match, and only substrings of the arguments need to be given to have a match (see return value). todo
| linkArgs | The arguments in the XLink. |
| targetArgs | The arguments in the target. |
0 if arguments are given in the linkArgs and those do not match.1 if the XLink has no arguments specified (or empty brackets), while the target has arguments.2 if no arguments are given in the XLink and the target has no arguments.3 - if both instances have no arguments, or4 if both instances have arguments provided and they match exactly. (This includes a given empty pair of brackets "()" on parameterless functions.) If each argument matches entirely, 3 is returned. This indicates to the caller that the arguments should be displayed in the XLink. Definition at line 208 of file target.cpp.
|
static |
Static method to parse an instance of this type from the given src and allocate the instance and its argument list in the given ma
| ma | The mono allocator to use. |
| parser | The substring used for parsing. The round brackets and their contents are removed when the method returns. |
nullptr is returned. Definition at line 28 of file target.cpp.
| void dxl::Target::FunctionArguments::Print | ( | alib::AString & | dest | ) |
Prints the parsed argument types in a standardized format.
| dest | The destination string. The string is not cleared. |
Definition at line 17 of file target.cpp.