Holds argument type and value information. More...
#include <kanzi/core/metadata/metamethod.hpp>
Public Member Functions | |
| template<typename TDataType > | |
| bool | get (AbstractPropertyType argumentType, TDataType &value) const |
| Overloaded version of get() using AbstractPropertyType to retrieve the value. | |
| template<typename TDataType > | |
| optional< TDataType > | get (const PropertyType< TDataType > &argumentType) const |
| Returns the value of the argument. | |
| AbstractPropertyType | getType () const |
| Returns the type of the argument. | |
| bool | isValid () const |
| Returns true if the argument stores a valid value, false otherwise. | |
| MethodArgument () | |
| Constructor. | |
| template<typename TDataType > | |
| MethodArgument (AbstractPropertyType argumentType, TDataType value) | |
| Creates an argument using an AbstractPropertyType. | |
| MethodArgument (const MethodArgument &other) | |
| Copy-constructor. | |
| template<typename TDataType > | |
| MethodArgument (const PropertyType< TDataType > &argumentType, typename PropertyType< TDataType >::DataType value) | |
| Creates an argument with a property type. | |
| MethodArgument & | operator= (const MethodArgument &other) |
| Assignment operator. | |
| ~MethodArgument () | |
| Destructor. | |
Holds argument type and value information.
The MethodArgument holds the type and value of a metamethod argument or the return value of the method. You can specify the value of the argument upon instantiation and retrieve it with one of the get() template function members.
|
explicit |
Constructor.
| kanzi::MethodArgument::~MethodArgument | ( | ) |
Destructor.
|
inlineexplicit |
Creates an argument with a property type.
| argumentType | A property type defining the type of the argument. |
| value | The value of the argument. |
|
inlineexplicit |
Creates an argument using an AbstractPropertyType.
The type of the value must match the type defined by the argumentType.
| argumentType | An abstract property type defining the type of the argument. |
| value | The value of the argument. |
|
inline |
Copy-constructor.
|
inline |
Assignment operator.
|
inline |
Returns the value of the argument.
The argumentType must match the type of the MethodArgument instance.
| argumentType | Type of the argument. |
|
inline |
Overloaded version of get() using AbstractPropertyType to retrieve the value.
| argumentType | AbstractPropertyType defining the type of the argument. |
| value | The address to store the argument value. |
|
inline |
Returns the type of the argument.
|
inline |
Returns true if the argument stores a valid value, false otherwise.