The object utility class includes an API decorator for object mapping.
Convenience methods for instrumenting object array mapping and retrieval.
Add an object accessor for conveniently storing and retrieving other objects.
var oSomeObject = {};
// Instrument oSomeObject with the object accessor API
Hemi.object.addObjectAccessor(oSomeObject, "demo");
var oChildObject = {};
// Add the chid object as "child1"
oSomeObject.addNewDemo(oChildObject, "child1");
// Retrieve the object reference
var oLookup = oSomeObject.getDemoByName("child1");A hash of variant identifiers whose value is the index of accessors. The array is created for an object with implementsObjectAccessor, and is stored on the objects sub structure.
array = Hemi.object.accessorindex
A hash of variant names whose value is the index of accessors. The array is created for an object with implementsObjectAccessor, and is stored on the objects sub structure.
array = Hemi.object.accessornames
An array of variant values. The array is created for an object with implementsObjectAccessor, and is stored on the objects sub structure.
array = Hemi.object.accessors
The objects property is used throughout the Hemi JavaScript Framework to store object pointers. This property as created if it does not exist.
object = Hemi.object.objects
Adds the object to the accessor array.
b = addNewAccessor( )
b as boolean: Bit indicating whether the object was added.
Creates object accessors, getAccessorByName, getAccessor, getAccessors, and isAccessor methods, and the Accessors, Accessornames, and Accessorindex arrays on the objects sub structure. It is up to the implementing class to specify the property values jointly in order for the method values to resolve.
b = addObjectAccessor( o, s )
b as boolean: Returns true if the accessors were created.
Creates the deconstructors sigterm and destroy.
b = addObjectDeconstructor( o )
b as boolean: Returns true if the accessors were created.
Clears all arrays and array maps.
void clearAccessors( )
Prepares the object to be destroyed. As a decoration, this method invokes any locally defined handle_destroy handler and increments the internal ready_state to five (5). The method is created for an object with addObjectDeconstructor.
void destroy( )
Returns the accessor for the given index. The method is created for an object with implementsObjectAccessor.
v = getAccessor( )
v as variant: The value of the accessor.
Returns the accessor based on the specified name. The method is created for an object with implementsObjectAccessor.
v = getAccessorByName( )
v as variant: The value of the accessor.
Returns the accessors array. The method is created for an object with implementsObjectAccessor.
a = getAccessors( )
a as array: The accessor array.
Returns true if the accessor exists. The method is created for an object with implementsObjectAccessor.
b = isAccessor( )
b as boolean: Bit indicating whether the accessor exists.
Removes the specified object from the accessor arrays.
void removeAccessor( )
Sends a termination signal to the object. This automatically invokes the destroy method. The method is created for an object with addObjectDeconstructor.
void sigterm( )
[ Hemi JavaScript Framework - Stephen W. Cote, 2002 - 2009. ]