# asIScriptStruct Class Reference

The interface for a script class or interface.

List of all members.

## Public Member Functions
virtual asIScriptEngine * | GetEngine () const =0
| Return the script engine.
virtual int | AddRef ()=0
| Increase reference counter.
virtual int | Release ()=0
| Decrease reference counter.
virtual int | GetStructTypeId ()=0
| Returns the type id of the object.
virtual asIObjectType * | GetObjectType ()=0
| Returns the object type interface for the object.
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)=0
| Returns the name of the property referenced by prop.
virtual void * | GetPropertyPointer (asUINT prop)=0
| Returns a pointer to the property referenced by prop.
virtual int | CopyFrom (asIScriptStruct *other)=0
| Copies the content from another object of the same type.

## Member Function Documentation

virtual asIScriptEngine* asIScriptStruct::GetEngine | ( |  | ) | const`[pure virtual]`

Returns:
  The script engine.

virtual int asIScriptStruct::AddRef | ( |  | ) | `[pure virtual]`

Returns:
  The number of references to this object.

Call this method when storing an additional reference to the object.

virtual int asIScriptStruct::Release | ( |  | ) | `[pure virtual]`

Returns:
  The number of references to this object.

Call this method when you will no longer use the references that you own.

virtual int asIScriptStruct::GetStructTypeId | ( |  | ) | `[pure virtual]`

Returns:
  The type id of the script object.

virtual asIObjectType* asIScriptStruct::GetObjectType | ( |  | ) | `[pure virtual]`

Returns:
  The object type interface of the script object.

virtual int asIScriptStruct::GetPropertyCount | ( |  | ) | `[pure virtual]`

Returns:
  The number of member properties of the script object.

virtual int asIScriptStruct::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* asIScriptStruct::GetPropertyName | ( | asUINT | prop | ) | `[pure virtual]`

Parameters:

  `[in]` | prop | The property index.

Returns:
  A null terminated string with the property name.

virtual void* asIScriptStruct::GetPropertyPointer | ( | asUINT | prop | ) | `[pure virtual]`

Parameters:

  `[in]` | prop | The property index.

Returns:
  A pointer to the property value.

The method returns a pointer to the memory location for the property. Use the type id for the property to determine the content of the pointer, and how to handle it.

virtual int asIScriptStruct::CopyFrom | ( | asIScriptStruct * | other | ) | `[pure virtual]`

Parameters:

  `[in]` | other | A pointer to the source object.

Returns:
  A negative value on error.

Return values:

  | asINVALID_ARG | The argument is null.
  | asINVALID_TYPE | The other object is of different type.

This method copies the contents of the other object to this one.