Glossary

A

Abstract Class
A class which does not act as a creator of instance objects. Abstract classes implement behavior for their subclasses.

Aggregation
A technique for utilizing the functionality of other objects without using inheritance. An aggregate object is a container for the objects whose functionality it wants to use, and delegates messages to the appropriate receivers. Aggregation is often used with object models which do not support inheritance, such as OLE.

For example, an OLE automation server which wants to provide OrderedCollection functionality can create its own OrderedCollection object, and implement "add" and "at" methods which simply delegate these functions to the OrderedCollection.

Attributes
The data encapsulated by an object. The only data which should be declared as part of an object's attributes is the data required to describe the object's state at any particular time.

For example, the attributes of a circle are its radius and the coordinates of its center. The actual code for implementing circle objects might require other data items for calculations, but these would not be considered part of the attributes for that object.

B

Base
The root class of the Object COBOL Class Library. All other Object COBOL programs supplied with this system inherit their fundamental behavior from Base.

C

Callback
An object of class Callback stores a reference to an object and the name of a method implemented by that object. When the Callback object is sent the "invoke" message, it executes the named method in the object it has stored.

One use of Callback objects is to handle GUI event processing. For example, the Phonebook GUIController has an Add method for adding new records. A Callback to this method in GUIController is attached to the pushbutton object for Add, and whenever the pushbutton is clicked it invokes this Callback.

Class
An Object COBOL program which contains the code and data descriptions for a class object and its instance objects. It is also known as the class program.

A class consists of nested COBOL programs, which correspond to class object and instance object methods. Each class starts with an identifier naming the class and the class from which it inherits. When a class is loaded at run-time, the OO run-time system creates the class object.

Class-Control paragraph
Lists all the classes the program is going to use. The Class-Control paragraph is part of the Object Section, in the Environment Division. Each entry links a class name to the filename of the class executable file. The class-names are the object references which the program uses for sending messages to the class object at run-time.

If the program itself is an Object COBOL class, the Class-Control paragraph also lists its superclass, and the class itself.

Class Object
An object which is a template for the creation of instance objects of the same type. For example, the the OrderedCollection class object creates instances of OrderedCollection.

The class object itself does not have the same behavior and methods as the instance objects which it creates. By analogy, a biscuit cutter is a template for creating biscuits; however, you can't eat a biscuit cutter and you can't stamp a biscuit from another biscuit.

In Object COBOL, all the methods and data for a class object and the instance objects which it creates are represented by a class program.

The class object is created at run-time when a class is loaded.

Class Library
The set of classes supplied with Object COBOL. The root class of the Class Library, Base, implements basic behavior for all classes, and provides a superclass for your own classes.

There are also classes to implement collections, exception handlers, Callbacks, and GUI interfaces.

Class Program
See Class.

Component
An object which can send and receive signals. Any object can be made into a component by sending it the "makeComponent" message. Components operate in a way analogous to microchips; they define a set of inputs and outputs. A component can send output signals regardless of whether or not there is another component receiving those signals, without causing a run-time error.

D

Dynamic Binding
The object which will receive a message is unknown when an Object COBOL program is compiled. The Object COBOL system determines the receiver at run-time.

E

Encapsulation
You can only access or manipulate an object's data through the methods it provides. To invoke a particular method, you send the object a message. The object's data is said to be encapsulated.

Event
Something done by a user, such as pressing a key, which causes a message to be sent to an object.

Exception
A processing error at run-time. Objects should be designed to raise exceptions whenever they encounter an error condition. The supplied Class Library provides a default exception handling mechanism which reports the error and shuts down the application. You can attach your own exception handling mechanisms to any class or instance object if you want a more sophisticated way of responding to exceptions.

F

Framework
A protocol used by several different types of object cooperating to implement a particular function. An individual class or instance object has a public interface which describes the way you communicate with that object. A framework describes the way in which different types of object interact together.

For example, the public interface to an OrderedCollection describes how you can add, retrieve and remove elements. The Collection framework describes how OrderedCollections (and other types of collection) communicate with the objects they are storing as elements.

G

Guard page
A memory page (4096 bytes on Intel processors) that has special permissions set on it so that it cannot be read or written to. By placing guard pages before or after pages assigned to object storage, the run-time system can catch attempts to read or write beyond the ends of object data.

H

Handle
See Object handle.

I

Inheritance
The mechanism by which a subclass has access to the functionality in its superclass. A subclass always inherits all the methods of its superclass, which it can override if necessary. A subclass can also inherit the data of its superclass, although this depends on the settings in the CLASS-ID header of both the subclass and the superclass. By identifying different types of objects which have common functionality, you can implement the common methods for that functionality in a single class and inherit it in any number of subclasses.

Each class inherits all the methods of its superclass, so a class ultimately inherits all methods all the way up to a root class. A class object inherits the class methods of its superclass, and an instance object inherits the instance methods of its superclass. In this Object COBOL implementation, a class has only one immediate superclass. The superclass is named in the INHERITS clause of the CLASS-ID header.

Input socket
Defines a set of signals which a component can receive. A single component can have many input sockets, and use each each socket to connect to a different component.

Instance
See Instance Object.

Instance object
A single occurrence of an object of a particular class. Instance objects are created by sending an appropriate message (usually "new") to a class object. For example, to create a window for display on the desktop, you send the "new" message to the Window class object.

The methods and data for instance objects are defined in the object program, which is nested within the class program. The object program starts with the header OBJECT and finishes with END OBJECT.

Intrinsic Class
A class corresponding to a COBOL intrinsic data type. These classes are used as templates so that you can send messages to COBOL intrinsic data using the INVOKE ... AS... construct. For more information, see the chapter Intrinsic Data.

L

Logical event
An event defined for a particular object, and raised by the object as a result of an event from the end-user. For example, a dialog box might define logical events to represent OK and Cancel, raising OK when the OK button is clicked and Cancel when the Cancel button is clicked. The parent of the dialog box can register interest in the OK and Cancel logical events, so that it can act on these events without knowing the details of the dialog box controls.

M

Memory leak
Memory no longer needed, but not deallocated by the OO system. An application should finalize an object when it is no longer required. When an application no longer has a handle to an object which still exists, the object is effectively unreachable, and can no longer be finalized. This is a memory leak.

Message
Invokes a method when sent to an object. The method invoked matches the message sent. The text of the message is known as the method selector.

The invoke verb enables you to send messages. For example:

  invoke anOrange "peel" 
         returning segments

The method selector "peel" invokes the peel method in anOrange. Data is returned from the method in data item SEGMENTS.

Message Binding
Ensuring that each message is delivered to the right object. Binding can be dynamic or static. In a statically bound object-oriented programming system (OOPS), the receiver of a message is determined at compile-time. In a dynamically bound OOPS, the receiver of a message is determined at run-time.

This release of Object COBOL supports dynamic binding only.

Metaclass
Enables the creation of class objects. All class objects are instances of the metaclass object. In Object COBOL, the metaclass is Behavior, which is part of the Class Library.

Method
Code manipulating or interrogating the data within an object. In Object COBOL, each method is coded as a nested program within a class.

O

Object
An encapsulation of data and methods. The only way to access an object's data is by sending it messages. You can also think of an object as intelligent data, which includes implementations for the operations (methods) appropriate to itself.

There are two types of object: classes and instances. A class object is created when you register a class; an instance is created whenever you send an appropriate message to the class object which defines that instance. The Object COBOL run-time system allocates each object its own data area in memory. There can be many instance objects of the same type within a run-unit, but there can only be one class object of each type.

Object Handle
An ID or reference by which you can access a particular object. Every object is assigned a handle when it gets created at run-time.

You always give the object handle when you send a message; the OO RTS uses the handle to find the object which should receive the message. You store object handles in data items of type OBJECT REFERENCE.

Object interface
The object interface is the list of methods implemented by an object, together with descriptions of the parameters passed to and from the object by each method.

Object reference
A COBOL data item, declared as OBJECT REFERENCE which can hold an object handle. You can pass object references as parameters when you send a message or make a COBOL CALL, in effect enabling you to pass objects between different parts of an application. Object references are untyped, so the same data item can hold an object reference for any class or instance object. That is, there is no distinction between the type of object reference declared to hold an instance of one class or another.

OLE Automation
Enables an object to expose a set of methods which can be invoked through Microsoft OLE, which is built into the Windows 95 and Windows NT operating systems.

OrderedCollection
A type of collection. You can either "add" elements to the end of an OrderedCollection, or "atPut" them to a particular indexed location. As you "add" elements, an OrderedCollection grows in size to accommodate them.

P

Parent
A run unit that has created another run unit or a window that has opened another window.

Persistence
The ability of the Object COBOL run-time system to remember the state of all objects in the system between runs. It does this by storing all objects in an indexed file.

Polymorphism
The method invoked by a particular message depends on the object which receives it. For example, you could implement several different classes of bank account object (checking, savings, high rate). All bank account objects would respond to the message"printStatement". However, each different type of account would implement "printStatement" differently, in a way appropriate to itself – savings accounts show interest paid, but checking accounts don't.

Polymorphism enables you to send the same message ("printStatement") to any type of account object and get appropriate results.

Public interface
A subset of an object interface, listing only the methods which should be used from outside the object. The public interface does not list any of the object's private or protected methods, which are only intended for use from inside the object or from its subclasses.

S

SELF
Reserved variable which contains the object handle of the object in which it occurs. Used to enable objects to send messages to themselves. If you send a message to SELF from object A, object A is the receiver of the message; if you send a message to self from object C, object C is the receiver of the message. SELF always refers to the object currently executing, even if the method is one which is being inherited. For example, imagine two objects, A' and B', instances of classes A and B where B inherits from A. A implements instance method, "calculateValue". The "calculateValue" method sends the message "getObjectConstant" to self. If B' gets sent the "calculateValue" message, the method is inherited from class A. When "calculateValue" sends a message "getObjectConstant", the message actually gets sent to B'. If A' were to be sent the "calculateValue" message, then the send to SELF would send the message to A'.

You can use SELF exactly like any data item of type Object Reference, so you can also pass it as a parameter to other methods.

SELFCLASS
Reserved variable which contains an object handle for the class object for this current object. Enables an instance to send a message to the class object which created it. You can use SELFCLASS exactly like any data item of type Object Reference, so you can also pass it as a parameter to other methods.

Signal
The way components communicate. When a component sends a signal, it is received by all components connected to the sender. The receiving component only acts on the signal if it has an input socket and method defined for that signal. A component which sends a signal event when there are no components connected does not cause a run-time error.

Contrast with a message, which is sent to a single specific object. if the object does not understand the message it raises a run-time exception.

SOM
IBM's System Object Model. Enables objects written in different languages to interoperate. Distributed SOM also enables objects to interoperate across different processes on the same or different machines.

Subclass
A class descended from another one, inheriting its methods and data. In the Class Library supplied with Object COBOL all class are ultimately subclasses of Base.

SUPER
Reserved word which behaves like an object reference when used in an INVOKE statement. Like SELF, it enables an object to send a message to itself, but the search for a matching method starts in the code of the method's superclass. If used from an instance, the run-time system searches for a method beginning with the instance code of the superclass, and works its way up through the instance methods of all the superclasses until it finds a method matching the message. If used from a class method, the run-time system searches for a class method beginning with the class object code of the superclass and works its way up through the class methods of all the superclasses until it finds a method matching the message.

Unlike SELF, and SELFCLASS, SUPER is not a data item containing an object handle; you can't pass SUPER as a parameter to a method.

Superclass
The parent of a class. Every class has a single superclass immediately above it in the inheritance hierarchy, with the exception of those at the top of the hierarchy. In the supplied Class Library there is only one root class, Base, from which all other classes are descended.


Copyright © 1999 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.