Wrapper classes |
Homepage |
The wrapper classes "wrap" a basic-type value to allow storing it where a class object is required.
When getting a wrapper class object using type "obj", the wrapper object is "unwrapped" and its value is returned. See Obj vs UInt for details.
To see how to convert your Class to a wrapper class, see Class options: Wrapper.
Each wrapper class has the following functions (ClassName is the class name for the wrapper).
See the specific wrapper class for more details (String, Int, UInt, Short, UShort, Char, UChar, Float, Double).
%ClassName%_new(value = 0):
Creates a new wrapper object. The default value is the empty string (for the
String Class) and zero for the others.
%ClassName%_destroy(WrapperObject):
Destroys the wrapper object and frees its memory.
%ClassName%_getValue(WrapperObject):
Returns the value stored in the wrapper object.
%ClassName%_setValue(WrapperObject, value = 0):
Sets the value stored in the wrapper object. The default value is the empty
string (for the String Class) and zero for the others.