Thunder.ObjectEx: | Functions | Types | Modinfo | Source |
CopyObject | Copies an Object of any type. |
CopyObjectTree | Copies an Object of any type and its children. |
IntToObject | Converts Int to Object. |
ObjectToInt | Converts any Object type to Int. |
ObjectToPtr | Converts any Object type to Byte Ptr (doing this implicitly in BlitzMax gives you the same pointer + 8 byte) |
PtrToObject | Converts Byte Ptr to Object (impossible in BlitzMax) |
ObjectEx | ObjectEx. |
ObjectExIdent |
Function CopyObject:Object(x:Object) | |
Returns | Flat Copy of x. |
Description | Copies an Object of any type. |
Information | Copy an Object of any type. This will copy references as they are. So references in the copied instance will point at the same structures as references from the source instance. |
Function CopyObjectTree:Object(x:Object) | |
Returns | Recursive Copy of x. |
Description | Copies an Object of any type and its children. |
Information | This function copies a whole instance recursively and tries to avoid copying child objects more than once. It parses the debug_scope which is a structure that saves all names of fields, methods etc., their types and offset. Pointers are treated like primitives. Arrays they might point to are not copied. |
Function IntToObject:Object(x:Int) | |
Returns | x as Object. |
Description | Converts Int to Object. |
Function ObjectToInt:Int(x:Object) | |
Returns | x as Integer. |
Description | Converts any Object type to Int. |
Function ObjectToPtr:Byte Ptr(x:Object) | |
Returns | Pointer to x. |
Description | Converts any Object type to Byte Ptr (doing this implicitly in BlitzMax gives you the same pointer + 8 byte) |
Function PtrToObject:Object(x:Byte Ptr) | |
Returns | Object from x. |
Description | Converts Byte Ptr to Object (impossible in BlitzMax) |
Type ObjectEx | |
Description | ObjectEx. |
Fields Summary | |
---|---|
class , ident , name , size |
Methods Summary | |
---|---|
Constants | Search all Constants. |
Fields | Search all Fields. |
Functions | Search all Functions. |
Get | Get the value of a Field. |
GetConstValue | Get the value of a Constant. |
GetDouble | Get the value of a Double Field. |
GetFloat | Get the value of a Float Field. |
GetLong | Get the value of a Long Field. |
Identifier | Finds an Identifier by name in the ObjectEx. |
Methods | Search all Methods. |
Set | Set the value of a Field. |
SetDouble | Set the value of a Double Field. |
SetFloat | Set the value of a Float Field. |
SetLong | Set the value of a Long Field. |
Functions Summary | |
---|---|
Create | Creates an ObjectEx from an Object instance of any type. |
Field class:Int Ptr | |
Description | Pointer to the BBClass structure. |
Information | Every Type has its own BBClass structure. It saves Methods and Functions, a pointer to the Super class, the debug_scope, the size of an instance of that class etc. |
Field ident:TMap | |
Description | ident saves all Identifiers of the Type (Const, Field, Method, |
Field name:String | |
Description | Name of the Type that the ObjectEx represents. |
Field size | |
Description | size represents the size of an instance of the Type the ObjectEx was. |
Method Constants:ObjectExIdent[]() | |
Returns | Array of ObjectExIdent of all Constants. |
Description | Search all Constants. |
Method Fields:ObjectExIdent[]() | |
Returns | Array of ObjectExIdent of all Fields. |
Description | Search all Fields. |
Method Functions:ObjectExIdent[]() | |
Returns | Array of ObjectExIdent of all Functions. |
Description | Search all Functions. |
Method Get(o:Object, name:String) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Field. |
Method GetConstValue:String(o:Object, name:String) | |
Returns | Value of the specific Constant the ObjectExIdent represents. |
Description | Get the value of a Constant. |
Method GetDouble:Double(o:Object, name:String) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Double Field. |
Method GetFloat:Float(o:Object, name:String) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Float Field. |
Method GetLong:Long(o:Object, name:String) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Long Field. |
Method Identifier:ObjectExIdent(name:String) | |
Returns | ObjectExIdent for a given Identifier in an ObjectEx. |
Description | Finds an Identifier by name in the ObjectEx. |
Method Methods:ObjectExIdent[]() | |
Returns | Array of ObjectExIdent of all Methods. |
Description | Search all Methods. |
Method Set(o:Object, name:String, val) | |
Description | Set the value of a Field. |
Information | Set the value of the Field the ObjectExIdent represents. This function takes an integer value, but by using ObjectToInt you can also store Types, Arrays and Strings. For 64 bit and floating point types you will need the functions below. |
Method SetDouble(o:Object, name:String, val:Double) | |
Description | Set the value of a Double Field. |
Information | Set the value of the Field the ObjectExIdent represents. |
Method SetFloat(o:Object, name:String, val:Float) | |
Description | Set the value of a Float Field. |
Information | Set the value of the Field the ObjectExIdent represents. |
Method SetLong(o:Object, name:String, val:Long) | |
Description | Set the value of a Long Field. |
Information | Set the value of the Field the ObjectExIdent represents. |
Function Create:ObjectEx(inst:Object) | |
Returns | An ObjectEx. |
Description | Creates an ObjectEx from an Object instance of any type. |
Information | This gathers information in the instance's and its debug_scope's structures for creating an ObjectEx. |
Type ObjectExIdent |
Fields Summary | |
---|---|
name , typ |
Methods Summary | |
---|---|
Get | Get the value of a Field. |
GetDouble | Get the value of a Double Field. |
GetFloat | Get the value of a Float Field. |
GetLong | Get the value of a Long Field. |
Set | Set the value of a Field. |
SetDouble | Set the value of a Double Field. |
SetFloat | Set the value of a Float Field. |
SetLong | Set the value of a Long Field. |
Field name:String | |
Description | Name of Variable/Constant/Method/Function. |
Field typ:String | |
Description | Type Tag. Specifies type of a Variable or return type and parameter list of Functions/Methods. |
Method Get(o:Object) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Field. |
Method GetDouble:Double(o:Object) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Double Field. |
Method GetFloat:Float(o:Object) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Float Field. |
Method GetLong:Long(o:Object) | |
Returns | Value of the specific Field the ObjectExIdent represents. |
Description | Get the value of a Long Field. |
Method Set(o:Object, val) | |
Description | Set the value of a Field. |
Method SetDouble(o:Object, val:Double) | |
Description | Set the value of a Double Field. |
Method SetFloat(o:Object, val:Float) | |
Description | Set the value of a Float Field. |
Method SetLong(o:Object, val:Long) | |
Description | Set the value of a Long Field. |
Version | 0.5 |
---|---|
Author | Thunder |
License | WTFPL |