Thunder.ObjectEx: Functions Types Modinfo Source  

Thunder.ObjectEx

Functions Summary

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)

Types Summary

ObjectEx ObjectEx.
ObjectExIdent  

Functions

Function CopyObject:Object(x:Object)
ReturnsFlat Copy of x.
DescriptionCopies an Object of any type.
InformationCopy 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)
ReturnsRecursive Copy of x.
DescriptionCopies an Object of any type and its children.
InformationThis 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)
Returnsx as Object.
DescriptionConverts Int to Object.

Function ObjectToInt:Int(x:Object)
Returnsx as Integer.
DescriptionConverts any Object type to Int.

Function ObjectToPtr:Byte Ptr(x:Object)
ReturnsPointer to x.
DescriptionConverts any Object type to Byte Ptr (doing this implicitly in BlitzMax gives you the same pointer + 8 byte)

Function PtrToObject:Object(x:Byte Ptr)
ReturnsObject from x.
DescriptionConverts Byte Ptr to Object (impossible in BlitzMax)

Types

Type ObjectEx
DescriptionObjectEx.
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
DescriptionPointer to the BBClass structure.
InformationEvery 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
Descriptionident saves all Identifiers of the Type (Const, Field, Method,
Field name:String
DescriptionName of the Type that the ObjectEx represents.
Field size
Descriptionsize represents the size of an instance of the Type the ObjectEx was.
Method Constants:ObjectExIdent[]()
ReturnsArray of ObjectExIdent of all Constants.
DescriptionSearch all Constants.
Method Fields:ObjectExIdent[]()
ReturnsArray of ObjectExIdent of all Fields.
DescriptionSearch all Fields.
Method Functions:ObjectExIdent[]()
ReturnsArray of ObjectExIdent of all Functions.
DescriptionSearch all Functions.
Method Get(o:Object, name:String)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Field.
Method GetConstValue:String(o:Object, name:String)
ReturnsValue of the specific Constant the ObjectExIdent represents.
DescriptionGet the value of a Constant.
Method GetDouble:Double(o:Object, name:String)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Double Field.
Method GetFloat:Float(o:Object, name:String)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Float Field.
Method GetLong:Long(o:Object, name:String)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Long Field.
Method Identifier:ObjectExIdent(name:String)
ReturnsObjectExIdent for a given Identifier in an ObjectEx.
DescriptionFinds an Identifier by name in the ObjectEx.
Method Methods:ObjectExIdent[]()
ReturnsArray of ObjectExIdent of all Methods.
DescriptionSearch all Methods.
Method Set(o:Object, name:String, val)
DescriptionSet the value of a Field.
InformationSet 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)
DescriptionSet the value of a Double Field.
InformationSet the value of the Field the ObjectExIdent represents.
Method SetFloat(o:Object, name:String, val:Float)
DescriptionSet the value of a Float Field.
InformationSet the value of the Field the ObjectExIdent represents.
Method SetLong(o:Object, name:String, val:Long)
DescriptionSet the value of a Long Field.
InformationSet the value of the Field the ObjectExIdent represents.
Function Create:ObjectEx(inst:Object)
ReturnsAn ObjectEx.
DescriptionCreates an ObjectEx from an Object instance of any type.
InformationThis 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
DescriptionName of Variable/Constant/Method/Function.
Field typ:String
DescriptionType Tag. Specifies type of a Variable or return type and parameter list of Functions/Methods.
Method Get(o:Object)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Field.
Method GetDouble:Double(o:Object)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Double Field.
Method GetFloat:Float(o:Object)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Float Field.
Method GetLong:Long(o:Object)
ReturnsValue of the specific Field the ObjectExIdent represents.
DescriptionGet the value of a Long Field.
Method Set(o:Object, val)
DescriptionSet the value of a Field.
Method SetDouble(o:Object, val:Double)
DescriptionSet the value of a Double Field.
Method SetFloat(o:Object, val:Float)
DescriptionSet the value of a Float Field.
Method SetLong(o:Object, val:Long)
DescriptionSet the value of a Long Field.

Module Information

Version0.5
AuthorThunder
LicenseWTFPL