VCF::Method Class Reference
Base class for dynamic method invocation Methods are dynamically invokable and can support querying for argument types querying is done throught the
getArgumentType() method and will only work if the argTypes_ string has bee set appropriately.
More...
#include <vcf/FoundationKit/Method.h>
List of all members.
Detailed Description
Base class for dynamic method invocation Methods are dynamically invokable and can support querying for argument types querying is done throught the
getArgumentType() method and will only work if the argTypes_ string has bee set appropriately.
This string consists of a series of characters each of which are interpreted as a special code for the primitive type. The code table is as follows:
code | primitive type
----------------------------
"i" | integer
"l" | long
"h" | short
"+l" | unsigned long
"f" | float
"c" | char
"d" | double
"o" | Object*
"b" | bool
"s" | String or String&
"e" | Enum*
To create an instance of a Method object use one of the template based classes described below.
Constructor & Destructor Documentation
| VCF::Method::Method |
( |
|
) |
[inline] |
|
| virtual VCF::Method::~Method |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
| virtual Method* VCF::Method::clone |
( |
|
) |
[pure virtual] |
|
| uint32 VCF::Method::getArgCount |
( |
|
) |
[inline] |
|
|
|
returns the numbers of arguments required to invoke the method.
|
|
|
returns the argument type for the specified argument
- Parameters:
-
| uint32 | a zero based index representing a particular argument. For a method declared like this void someMethod( bool, int ) then an index of 0 would represent the frist argument (bool), and index 1 would represnt the second argument(int). |
- Returns:
- PropertyDescriptorType the argument type
|
| String VCF::Method::getName |
( |
|
) |
[inline] |
|
|
|
returns the name of the method
|
| virtual Object* VCF::Method::getSource |
( |
|
) |
[pure virtual] |
|
|
|
returns the bound source of the method - may return NULL if no source has been set
|
| bool VCF::Method::hasReturnValue |
( |
|
) |
[inline] |
|
|
|
specifies whether or not the method has a return value
- Returns:
- bool true if the method has a return value otherwise false
|
|
|
invoke the method on the source object We don't need the number of elements in the arguments[] because argCount_ should be set and we can use these.
If this is not the case then the programmer has screwed up somewhere ! the source argument may be NULL, in this case the implementing code should Assumes setSource() has already been called this would have gotten set when the class or interface the method belonged to was retreived from the Object in question |
| void VCF::Method::setName |
( |
const String & |
name |
) |
[inline] |
|
|
|
sets the name of the method
|
| virtual void VCF::Method::setSource |
( |
const Object * |
source |
) |
[pure virtual] |
|
| virtual void VCF::Method::setSource |
( |
Object * |
source |
) |
[pure virtual] |
|
|
|
sets the source of the object
|
Member Data Documentation
The documentation for this class was generated from the following file: