Class StructureElement
Inheritance
Object | StructureElement 🡄 Object |
Properties
Bytesize | The number of bytes of this element. |
ChildStruct | If not nil this element is a pointer to the structure defined here. |
ChildStructStart | The number of bytes inside the provided childstruct. |
Name | The name of this element. |
Offset | The offset of this element. |
Owner | The structure this element belongs to. |
Vartype | The variable type of this element. |
Methods
getBytesize () | Gets the bytesize of the element. |
getChildStruct () | |
getChildStructStart () | |
getName () | Returns the name of this element. |
getOffset () | Returns the offset of this element. |
getOwnerStructure () | Returns the structure this element belongs to. |
getValue ( address ) | Gets the memory from the specified address and interprets it according to the element type. |
getValueFromBase ( baseaddress ) | Same as getValue but uses the offset to calculate the final address. |
getVartype () | Returns the variable type of this element. |
setBytesize ( size ) | Sets the bytesize for types that are affected (string, aob). |
setChildStruct ( structure ) | |
setChildStructStart ( offset ) | |
setName ( name ) | Sets the name of this element. |
setOffset ( offset ) | Sets the offset of this element. |
setValue ( address, value ) | Sets the memory at the specified address to the interpreted value according to the element type. |
setValueFromBase ( baseaddress, value ) | Same as setValue but uses the offset to calculate the final address. |
setVartype ( vartype ) |
Inheritance
- Object
- StructureElement 🡄 Object
Properties
- Bytesize
-
The number of bytes of this element.
Readonly for basic types, writable for types that require a defined length like strings and array of bytes.
Type:
integer - ChildStruct
-
If not nil this element is a pointer to the structure defined here.
Type:
- ChildStructStart
-
The number of bytes inside the provided childstruct.
(E.g: It might point to offset 10 of a certain structure)
Type:
integer - Name
-
The name of this element.
Type:
- Offset
-
The offset of this element.
Type:
integer - Owner
-
The structure this element belongs to. Readonly
Type:
- Vartype
-
The variable type of this element.
Type:
integer
Methods
- getBytesize ()
- Gets the bytesize of the element. Usually returns the size of the type, except for string and aob.
- getChildStruct ()
-
Returns:
- getChildStructStart ()
- getName ()
-
Returns the name of this element.
Returns:
- getOffset ()
-
Returns the offset of this element.
Returns:
-
integer
- getOwnerStructure ()
-
Returns the structure this element belongs to.
Returns:
- getValue ( address )
-
Gets the memory from the specified address and interprets it according to the element type.
Parameters:
- address
- getValueFromBase ( baseaddress )
-
Same as getValue but uses the offset to calculate the final address.
Parameters:
- baseaddress
- getVartype ()
-
Returns the variable type of this element.
(check Variable types in defines.lua)
- setBytesize ( size )
-
Sets the bytesize for types that are affected (string, aob).
Parameters:
- size
- setChildStruct ( structure )
-
Parameters:
- structure Structure
- setChildStructStart ( offset )
-
Parameters:
- offset
- setName ( name )
-
Sets the name of this element.
(tip: Leave blank if you only want to set the name of the variable)
Parameters:
- name string
- setOffset ( offset )
-
Sets the offset of this element.
Parameters:
- offset integer
- setValue ( address, value )
-
Sets the memory at the specified address to the interpreted value according to the element type.
Parameters:
- address
- value
- setValueFromBase ( baseaddress, value )
-
Same as setValue but uses the offset to calculate the final address.
Parameters:
- baseaddress
- value )
- setVartype ( vartype )
-
Parameters:
- vartype