asIObjectType Class Reference
[Interfaces]
The interface for an object type.
List of all members.
|
Public Member Functions |
virtual asIScriptEngine * | GetEngine () const =0 |
| Returns a pointer to the script engine.
|
virtual const char * | GetName (int *length=0) const =0 |
| Returns a temporary pointer to the name of the datatype.
|
virtual asIObjectType * | GetSubType () const =0 |
| Returns a temporary pointer to the type associated with this descriptor.
|
virtual int | GetInterfaceCount () const =0 |
| Returns the number of interfaces implemented.
|
virtual asIObjectType * | GetInterface (asUINT index) const =0 |
| Returns a temporary pointer to the specified interface or null if none are found.
|
virtual bool | IsInterface () const =0 |
| Returns true if the type is an interface.
|
virtual int | GetMethodCount () const =0 |
| Returns the number of methods for the object type.
|
virtual int | GetMethodIdByIndex (int index) const =0 |
| Returns the method id by index.
|
virtual int | GetMethodIdByName (const char *name) const =0 |
| Returns the method id by name.
|
virtual int | GetMethodIdByDecl (const char *decl) const =0 |
| Returns the method id by declaration.
|
virtual asIScriptFunction * | GetMethodDescriptorByIndex (int index) const =0 |
| Returns the function descriptor for the script method.
|
virtual int | GetPropertyCount ()=0 |
| Returns the number of properties that the object contains.
|
virtual int | GetPropertyTypeId (asUINT prop)=0 |
| Returns the type id of the property referenced by prop.
|
virtual const char * | GetPropertyName (asUINT prop, int *length=0)=0 |
| Returns the name of the property referenced by prop.
|
Member Function Documentation
- Returns:
- A pointer to the engine.
virtual const char* asIObjectType::GetName |
( |
int * |
length = 0 |
) |
const [pure virtual] |
- Parameters:
-
[out] | length | The length of the string |
- Returns:
- A null terminated string with the name of the object type.
virtual asIObjectType* asIObjectType::GetSubType |
( |
|
) |
const [pure virtual] |
- Returns:
- A pointer to the sub type.
virtual int asIObjectType::GetInterfaceCount |
( |
|
) |
const [pure virtual] |
- Returns:
- The number of interfaces implemented by this type.
- Parameters:
-
[in] | index | The interface index. |
- Returns:
- A pointer to the interface type.
virtual bool asIObjectType::IsInterface |
( |
|
) |
const [pure virtual] |
- Returns:
- True if the type is an interface.
virtual int asIObjectType::GetMethodCount |
( |
|
) |
const [pure virtual] |
- Returns:
- A negative value on error, or the number of methods for this object.
virtual int asIObjectType::GetMethodIdByIndex |
( |
int |
index |
) |
const [pure virtual] |
- Parameters:
-
[in] | index | The index of the method. |
- Returns:
- A negative value on error, or the method id.
- Return values:
-
| asINVALID_ARG | index is out of bounds. |
This method should be used to retrieve the ID of the script method for the object that you wish to execute. The ID is then sent to the context's
Prepare method.
virtual int asIObjectType::GetMethodIdByName |
( |
const char * |
name |
) |
const [pure virtual] |
- Parameters:
-
[in] | name | The name of the method. |
- Returns:
- A negative value on error, or the method id.
- Return values:
-
| asMULTIPLE_FUNCTIONS | Found multiple matching methods. |
| asNO_FUNCTION | Didn't find any matching method. |
This method should be used to retrieve the ID of the script method for the object that you wish to execute. The ID is then sent to the context's
Prepare method.
virtual int asIObjectType::GetMethodIdByDecl |
( |
const char * |
decl |
) |
const [pure virtual] |
- Parameters:
-
[in] | decl | The method signature. |
- Returns:
- A negative value on error, or the method id.
- Return values:
-
| asMULTIPLE_FUNCTIONS | Found multiple matching methods. |
| asNO_FUNCTION | Didn't find any matching method. |
| asINVALID_DECLARATION | decl is not a valid declaration. |
| asERROR | The module for the type was not built successfully. |
This method should be used to retrieve the ID of the script method for the object that you wish to execute. The ID is then sent to the context's
Prepare method.
The method will find the script method with the exact same declaration.
virtual asIScriptFunction* asIObjectType::GetMethodDescriptorByIndex |
( |
int |
index |
) |
const [pure virtual] |
- Parameters:
-
[in] | index | The index of the method. |
- Returns:
- A pointer to the method description interface, or null if not found.
virtual int asIObjectType::GetPropertyCount |
( |
|
) |
[pure virtual] |
- Returns:
- The number of member properties of the script object.
virtual int asIObjectType::GetPropertyTypeId |
( |
asUINT |
prop |
) |
[pure virtual] |
- Parameters:
-
[in] | prop | The property index. |
- Returns:
- The type id of the member property, or a negative value on error.
- Return values:
-
| asINVALID_ARG | prop is too large |
virtual const char* asIObjectType::GetPropertyName |
( |
asUINT |
prop, |
|
|
int * |
length = 0 | |
|
) |
| | [pure virtual] |
- Parameters:
-
[in] | prop | The property index. |
[out] | length | The length of the string |
- Returns:
- A null terminated string with the property name.