Table of Contents

OIL2 Class Standard.Object Version 1


class Standard . Object (1) {
} inherits from Nothing;

DESCRIPTION

The class Object provides facilities common to all objects within an FARGOS/VISTA Object Management Environment. All classes must inherit from class Object, either directly or via a base class. The sole exception is class Thread, which describes the methods that can be invoked against any thread.

METHODS


Standard.Object(1):addNotifyWhenModified

Object:addNotifyWhenModified(any object)

Method Description

The addNotifyWhenModified method provides a facility by which an object can be monitored for modifications. It should be used whenever an application wants to react to changes in an object's state but does not have any control over when or how such state changes may occur. Any number of object Ids or service names may be specified as arguments. Duplicate / redundant subscriptions are automatically pruned.

Whenever an object's instance variables are modified and the modifying thread terminates, all subscribers are sent an objectModified message. The object Id of the modified object will be passed as the only argument. If an object is deleted, the subscribers are sent an objectDeleted message and passed the object Id of the now deleted object.

Return Value

This method does not return a value.


Standard.Object(1):removeNotifyWhenModified

Object:removeNotifyWhenModified(any object)

Method Description

The removeNotifyWhenModified method removes subscriptions that were previously requested using addNotifyWhenModified. Any number of object Ids or service names may be specified.

Return Value

This method does not return a value.


Standard.Object(1):setMeta

Object:setMeta(oid metaObject)

Method Description

The setMeta method takes a single argument that specifies the Id of the object that is to be set as the meta object for the object that is the target of the setMeta invocation. If metaObject is nil, any current association with a meta object is removed. This method does not return a value.


Standard.Object(1):deleteYourself

Object:deleteYourself()

Method Description

The deleteYourself method is the means by which all objects are deleted. It takes no arguments and does not return a value.


Standard.Object(1):handleException

Object:handleException(string exceptionName)

Method Description

The handleException method is used to implement an exception handler. Applications that intend to do something intelligent with an exception will override the implementation of Object:handleException. The default implementation displays a dump of the offending thread frame on standard out. This method does not return a value.


Standard.Object(1):isOfClass

Object:isOfClass()

Method Description

The isOfClass method identifies an object's class.

Return Value

The class information is returned as an array. Subscript 0 is the class name; subscript 1 is the version Id of the class; subscript 2 holds the name of the name space.


Standard.Object(1):listAllowedMethods

Object:listAllowedMethods()

Method Description

The listAllowedMethods method returns an array that identifies all of the outstanding methods that are allowed to be invoked against an object. The first record is stored in subscript 0. Each record is itself a three-element array:

This method is normally only used by applications that need to get an entire snapshot of an object's state (such as PersistenceService).


Standard.Object(1):describeInstanceVariables

Object:describeInstanceVariables()

Method Description

An definition of an object's instance variables and the corresponding inheritance tree of its class can be obtained by the describeInstanceVariables method. Note that the information provided is descriptive and has its origins in the declarations that were made in the source code of the class implementation. An object's current live data can be obtained via the extractInstanceVariables method.

Return Value

The describeInstanceVariables method returns an array, subscripted starting at 0, that describes the instance variables of each inherited class. Subscript 0 will invariably hold information corresponding to class Object; the last element in the array will correspond to the class of the object being accessed.

Each record consists of a 4-element array, subscripted starting at 0:

Each instance variable description is in turn an associative array. The defined keys are:
name
a string specifying the instance variable's name
declaredType
an integer identifying the declared type of the instance variable.
storageType
the storage type that was used to hold the instance variable. Often a native storage layout is used for primitive types such as integers and floats; however, a generic (OMEtype) storage layout can be used.


Standard.Object(1):extractInstanceVariables

Object:extractInstanceVariables()

Method Description

The current state of all of an object's instance variables (the top level class and the corresponding inheritance tree) can be obtained by the extractInstanceVariables method.

Return Value

The extractInstanceVariables method returns an array, subscripted starting at 0, that describes the instance variables of each inherited class. Subscript 0 will invariably hold information corresponding to class Object; the last element in the array will correspond to the class of the object being accessed.

Each record is itself an array, subscripted starting at 0, that holds the current state of each instance variable at the specified class level.


Standard.Object(1):encodeObject

Object:encodeObject()

Method Description

The encodeObject method encodes the current state of an object into a single string. The returned string can be used in an invocation of ObjectCreator:importObject or ObjectCreator:duplicateObject on any FARGOS/VISTA Object Management Environment.


Standard.Object(1):objectImported

Object:objectImported()

Method Description

After an object is imported (by ObjectCreator:importObject) or duplicated (by ObjectCreator:duplicateObject) it is sent an objectImported message, which provides an opportunity to perform any needed work to reassociate the object with its new environment. The default implementation is a null method.

Return Value

This method does not return a value.


Generated: Mon, 16 Apr 2012 21:29:39 EDT
Support Information