      $set mfoo  localcount(250) early-release linkcount(300)
      $set defaultbyte"00"
           copy "chararry.if".
           copy "base.if".
      *>---------------------------------------------------------------
      *> DOCS-ROOT.
      *> Base is an abstract class which provides default methods for
      *> instance creation and copying, hashing, error handling and
      *> and comparisons. Base is the superclass of all other classes
      *> in the Class Library.
      *>
      *> Copyright (C) 1991-1999 Micro Focus International Ltd.
      *>
      *>----------------------------------------------------------------

       class-id. Base is abstract data is protected.


       special-names.
           call-convention 0 is paramcountcheck
           call-convention 66 is WAPI
           .
        object section.
        class-control.
           Base is class "base"
           Callback is class "callback"
           CharacterArray is class "chararry"
           cobolcomp5 is class "comp5"
           ExceptionManager is class "exptnmgr"
           DelegateManager is class "delegate"
           IdentitySet is class "iset"
           Event is class "event"
           Dictionary is class "dictinry"
           IdentityDictionary is class "idictnry"
           SystemDictionary is class "systemd"
           OrderedCollection is class "ordrdcll"
           CobolComp5Association is class "compasoc"
           PicXToObject is class "picxtoob"
           Association is class "associtn"
           MessageFileHandler is class "msgfh".

      $if debug defined
       working-storage section.
       01 acquiregroup.
                03 filler pic x(10) value "Acquiring".
                03 dispNum      pic 999999999.
                03 filler       pic x value x"00".

       01 releasegroup.
                03 filler pic x(10) value "Releasing".
                03 dispNum      pic 999999999.
                03 filler       pic x value x"00".

       01 Closegroup.
                03 filler pic x(10) value "Closing".
                03 dispNum      pic 999999999.
                03 filler       pic x value x"00".

       01 Opengroup.
                03 filler pic x(10) value "Opening".
                03 dispNum      pic 999999999.
                03 filler       pic x value x"00".

      $end  
       thread-local-storage section.


       78  numberOfEventObjects         value 1024.
       78  numberOfRegisteredEvents     value 20.


       class-object.

       object-storage section.
      *>>---------------------------------------------------------------
      *>> The maximum size in bytes of an OBJECT.  Limit is 256Meg.
      *>>---------------------------------------------------------------
       78 maxnumberbytes               value h"0FFFFFFF".

      *>>---------------------------------------------------------------
      *>> The size of an object reference
      *>>---------------------------------------------------------------
       78 objectReferenceSize          value length of self.


      *>----------------------------------------------------------------
      *> Return false this is not a metaclass.
      *>----------------------------------------------------------------
       method-id. "isMetaClass".
       local-storage section.
       linkage section.
       01 lnkBool        pic x comp-5.
       procedure division returning lnkBool.
            move zero to lnkBool
            exit program.
       end method "isMetaClass".

      *>----------------------------------------------------------------
      *> Load the extensions for base.
      *>----------------------------------------------------------------
       method-id. "initializeClass".
       local-storage section.
       01 lsBaseExt             pic x(5).
       procedure division.
           if self = Base
                move "ebase" to lsBaseExt
                call lsBaseExt
           end-if
           exit method.
       end method "initializeClass".


      *>----------------------------------------------------------------
      *> This method is included in the class as well as the instance
      *> methods otherwise it will not get resolved for the class base
      *> on a second run.
      *>----------------------------------------------------------------


      *>----------------------------------------------------------------
      *> PRIVATE. Change references of this object to point to lnkObject
      *> and vice versa. However this is not allowed currently for
      *> classes.
      *>----------------------------------------------------------------

       method-id. "becomes".
       local-storage section.
       01 i           pic x(4) comp-5.
       01 anObject    usage object reference.
       procedure division.
           move 88 to i
           invoke self "raiseException" using i returning anObject
       end method "becomes".


       end class-object.

       Object.

       object-storage section.
       78  numberOfStandardOutputs      value 20.
       78  numberOfStandardSockets      value 5.
       78  numberOfStandardDependants   value 5.
       78  numberOfStandardSpies        value 1.
       78  numberOfSocketSignals        value 20.
       78  numberOfHandlersForSignal    value 5.

       78  traceRecordTooLong           value 101.

       78  inputSocketUndefined         value 93.
       78  outputSocketUninitialized    value 94.
       78  outputSignalUndefined        value 95.
       78  duplicateOutputSignal        value 96.
       78  internalError                value 97.
       78  duplicateInputSignal         value 98.
       78  resourceNotFound             value 99.
       78  resourceFileError            value 100.

      *>>---------------------------------------------------------------
      *>> The maximum size in bytes of an OBJECT.  Limit is 256Meg.
      *>>---------------------------------------------------------------
       78 maxnumberbytes               value h"0FFFFFFF".

      *>>---------------------------------------------------------------
      *>> The size of an object reference
      *>>---------------------------------------------------------------
       78 objectReferenceSize          value length of self.
      *>----------------------------------------------------------------
      *> Answer true if the receiver is a kind of menu, else answer
      *> false.
      *>----------------------------------------------------------------

       method-id. "isMenu".
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move 0 to lnkbool
           exit method.
       end method "isMenu".

      *>----------------------------------------------------------------
      *> Return the base message File handler.
      *>----------------------------------------------------------------
       method-id. "registerBaseMessageFile".
       local-storage section.
       01 OS-Info-Param-Block.
           03  Parameter-Size         PIC X(2) COMP-X.
           03  P-OS-Type              PIC X    COMP-X.
           03  p-os-version           PIC X(4) comp-x.
           03  p-dbcs-support         pic x    comp-x.
           03  filler                 pic x(10).

       linkage section.
       01 msgfh                  usage object reference.

       procedure division returning msgfh.
           move length of OS-Info-Param-Block to parameter-size
           CALL "CBL_GET_OS_INFO" USING OS-Info-Param-Block
           if p-os-type = 128 *>> On Unix           
                invoke MessageFileHandler "registerMessageFileZ" using
                                x"00"
                                z"oocobol.lng"
                                returning msgfh
           else
                invoke MessageFileHandler "registerMessageFileZ" using
                                x"00"
                                z"OOCOBOL.LNG"
                                returning msgfh

           end-if
           exit method.
       end method "registerBaseMessageFile".

      *>----------------------------------------------------------------
      *> Answer true if the receiver is a color, else answer false.
      *>----------------------------------------------------------------

       method-id. "isColor".
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move 0 to lnkbool
           exit method.
       end method "isColor".
      *>----------------------------------------------------------------
      *> Answer true if the receiver is a bitmap, else answer false.
      *>----------------------------------------------------------------

       method-id. "isBitmap".
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move 0 to lnkbool
           exit method.
       end method "isBitmap".
      *>----------------------------------------------------------------
      *> Answer true if the receiver is an icon, else answer false.
      *>----------------------------------------------------------------

       method-id. "isIcon".
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move 0 to lnkbool
           exit method.
       end method "isIcon".
      *>----------------------------------------------------------------
      *> Answer true if the receiver is a DBCSCharacterArray otherwise
      *> answer false.
      *>----------------------------------------------------------------

       method-id. "isDBCSCharacterArray".
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move 0 to lnkbool
           exit method.
       end method "isDBCSCharacterArray".
      *>----------------------------------------------------------------
      *> Answer true if we are in a DBCS environment otherwise return
      *> false.
      *>----------------------------------------------------------------

       method-id. "isDBCSEnvironment".
       local-storage section.
       01 OS-Info-Param-Block.
           03  Parameter-Size         PIC X(2) COMP-X.
           03  P-OS-Type              PIC X    COMP-X.
           03  p-os-version           PIC X(4) comp-x.
           03  p-dbcs-support         pic x    comp-x.
           03  filler                 pic x(10).
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move length of OS-Info-Param-Block to parameter-size
           CALL "CBL_GET_OS_INFO" USING OS-Info-Param-Block
           move h"01" to lnkBool
           call "CBL_AND" using p-dbcs-support
                                lnkBool
                                by value 1 size 4
           exit method.
       end method "isDBCSEnvironment".
      *>----------------------------------------------------------------
      *> Return true is this object is a class otherwise return false.
      *>----------------------------------------------------------------
       method-id. "isClass".
       linkage section.
       01 lnkbool               pic x comp-5.
       procedure division returning lnkbool.
           move 0 to lnkBool
           exit method.
       end method "isClass".

      *>----------------------------------------------------------------
      *> Answer true if the receiver is a kind of printer, else answer
      *> false.
      *>----------------------------------------------------------------

       method-id. "isPrinter".
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move 0 to lnkbool
           exit method.
       end method "isPrinter".
      *>------------------------------------------------------------
      *> Respond true if input signal lnkSignalId has been defined
      *> on socket lnkSocketId.
      *>------------------------------------------------------------
       Method-id. "isInputSignal".
       local-storage section.
       01  lsPointer                  pointer.
       01  lsSocket                   object reference.
       01  lsCallback                 object reference.
       01  lsSignalId                 pic x(32).
       01  lsSocketId                 pic x(32).
       01  i                          pic s9(9) comp-5.

       linkage section.
       01  lnkSocketId                pic x(32).
       01  lnkSignalId                pic x(32).
       copy "compnent.cpy".
       01  lnkBool                    pic x comp-5.
           88 isTrue                  value 1.
           88 isFalse                 value 0.

       procedure division using lnkSocketId
                                lnkSignalId
                      returning lnkBool.
           call "oopsgetcomponentdata" using self
                        returning lsPointer
           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           move spaces to lsSocketId
           perform varying i from 1 by 1
                   until lnkSocketId(i:1) = x"00"
                   or    lnkSocketId(i:1) = space
               move lnkSocketId(i:1) to lsSocketId(i:1)
           end-perform
           move spaces to lsSignalId
           perform varying i from 1 by 1
                   until lnkSignalId(i:1) = x"00"
                   or    lnkSignalId(i:1) = space
               move lnkSignalId(i:1) to lsSignalId(i:1)
           end-perform
           invoke self "getSocket" using lsSocketId(1:32)
                               returning lsSocket
           if lsSocket <> null
               invoke lsSocket "atOrNil" using lsSignalId
                                     returning lsCallback
               if lsCallback <> null
                   set isTrue to true
               else
                   set isFalse to true
               end-if
           else
               set isFalse to true
           end-if
           copy "csleave".
           exit method.
       end method "isInputSignal".
      *>------------------------------------------------------------
      *> Returns an IdentitySet containing handlers of an output
      *> signal. Returns nil if none.
      *>------------------------------------------------------------
       Method-id. "getSignalHandlers".
       local-storage section.
       01  lsSignalHandlers           object reference.
       01  i                          pic s9(9) comp-5.
       01  lsCallback                 object reference.

       linkage section.
       01  lnkSignalId                pic x(32).
       01  lnkSignalHandlers          object reference.

       procedure division using lnkSignalId
                      returning lnkSignalHandlers.
           invoke self "getOutputSignalCallbacks" using lnkSignalId
                                      returning lsSignalHandlers
           if lsSignalHandlers <> null
               invoke lsSignalHandlers "size" returning i
               invoke IdentitySet "ofReferences" using i
                                       returning lnkSignalHandlers
               invoke Callback "new" using self "addReceiver "
                                           lnkSignalHandlers
                                 returning lsCallback
               invoke lsSignalHandlers "do" using lsCallback
           else
               set lnkSignalHandlers to null
           end-if
           exit method.
       end method "getSignalHandlers".
      *>------------------------------------------------------------
      *> PRIVATE. Returns the callbacks handling an output signal
      *> for a component
      *>------------------------------------------------------------
       Method-id. "getOutputSignalCallbacks".
       local-storage section.
       01  lsSignalId                 pic x(32).
       01  i                          pic s9(9) comp-5.
       01  lsPointer                  pointer.

       linkage section.
       01  lnkSignalId                pic x(32).
       01  lnkSignalHandlers          object reference.
       copy "compnent.cpy".

       procedure division using lnkSignalId
                      returning lnkSignalHandlers.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           move spaces to lsSignalId
           perform varying i from 1 by 1
                   until lnkSignalId(i:1) = x"00"
                   or    lnkSignalId(i:1) = space
               move lnkSignalId(i:1) to lsSignalId(i:1)
           end-perform
           if outputs <> null
               invoke outputs "atOrNil" using lsSignalId(1:32)
                                    returning lnkSignalHandlers
           else
               raise exception outputSocketUninitialized
           end-if
           copy "csleave".
           exit method.
       end method "getOutputSignalCallbacks".
      *>------------------------------------------------------------
      *> PRIVATE. Callback used by getSignalHandlers
      *>------------------------------------------------------------
       Method-id. "addReceiver".

       local-storage section.
       01  lsReceiver                 object reference.

       linkage section.
       01  lnkCallback                object reference.
       01  lnkSignalHandlers          object reference.

       procedure division using lnkSignalHandlers lnkCallback.
           invoke lnkCallback "getReceiver" returning lsReceiver
           invoke lnkSignalHandlers "add" using lsReceiver
           exit method.
       end method "addReceiver".
      *>------------------------------------------------------------
      *> Disconnect a component from an output signal
      *>------------------------------------------------------------
       Method-id. "disconnectSignal".

       local-storage section.
       01  lsSignalHandlers           object reference.

       linkage section.
       01  lnkSignalId                pic x(32).
       01  lnkComponent               object reference.

       procedure division using lnkSignalId lnkComponent.
           invoke self "getOutputSignalCallbacks" using lnkSignalId
                                              returning lsSignalHandlers
           if lsSignalHandlers <> null
               invoke self "disconnectSignals" using lnkComponent
                                                     lsSignalHandlers
           end-if
           exit method.
       end method "disconnectSignal".
      *>------------------------------------------------------------
      *> PRIVATE. Returns a list of the components dependent on self
      *>------------------------------------------------------------
       Method-id. "getSignalDependents".
       local-storage section.
       01  lsPointer                  pointer.

       linkage section.
       01  lnkDependents              object reference.
       copy "compnent.cpy".

       procedure division returning lnkDependents.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           set lnkDependents to dependants
           copy "csleave".
           exit method.
       end method "getSignalDependents".


      $if gc defined
      *>----------------------------------------------------------------
      *> This is the last method that is invoked on an object before it
      *> is destroyed. If you override this method you should always
      *> invoke the super method.
      *>----------------------------------------------------------------
       method-id. "terminating".
       local-storage section.
       01 lsFlag               pic x(4) comp-5.
       01 lsPointer            pointer.

       linkage section.
       copy "compnent.cpy".

       procedure division.
           call "oopsgetcomponentdata" using self
                            returning lsPointer
           if lsPointer not = null
               invoke self "disconnect"
               set address of componentInstanceData
                        to  lsPointer
               copy "csdelete".
               invoke self "dealloc" using lsPointer
               set lsPointer to null
               call "oopssetcomponentdata" using self lsPointer
           end-if
           exit method.
       end method "terminating".

      *>----------------------------------------------------------------
      *> Destroys the object to which this message is sent. The result
      *> is always set to null. Therefore invoke anObject "finalize"
      *> returning anObject. Will destroy anObject and set the reference
      *> to null.
      *>----------------------------------------------------------------
       method-id. "finalize".
       linkage section.
       01 result               usage object reference.

       procedure division returning result.
           set result to null
           exit method.
       end method "finalize".

      $else

      *>----------------------------------------------------------------
      *> Destroys the object to which this message is sent. The result
      *> is always set to null. Therefore invoke anObject "finalize"
      *> returning anObject. Will destroy anObject and set the reference
      *> to null.
      *>----------------------------------------------------------------
       method-id. "finalize".
       local-storage section.
       01 exceptionnumber      pic x(4) comp-5.
       01 lsBool               pic x comp-5.
          88 isTrue            value 1.
          88 isFalse           value 0.
       01 lsFlag               pic x(4) comp-5.
       01 lsPointer            pointer.

       linkage section.
       01 result               usage object reference.
       copy "compnent.cpy".
       procedure division returning result.
           if self equal to null
               move 27 to exceptionnumber
               invoke self "raiseException" using exceptionnumber
                                             returning result
           else
               set result to null
               call "oopsgetcomponentdata" using self
                                returning lsPointer
               if lsPointer not = null
                   invoke self "disconnect"
                   set address of componentInstanceData
                            to  lsPointer
                   copy "csdelete".
                   invoke self "dealloc" using lsPointer
                   set lsPointer to null
                   call "oopssetcomponentdata" using self lsPointer
               end-if
               call "oopscancel" using self
      *>> Note, instance data is not linked so must not access after
      *>> cancel.

           end-if
           exit method.
       end method "finalize".

      $end

      *>----------------------------------------------------------------
      *> Destroy this object, and all the elements in it up to a depth
      *> lnkDepth.
      *>----------------------------------------------------------------
       method-id. "deepfinalizeWithDepth".
       linkage section.
       01 lnkDepth             pic x(4) comp-5.
       01 defaultreturn        usage object reference.

       procedure division using lnkDepth returning defaultreturn.
           invoke self "finalize" returning defaultReturn
           exit method.
       end method "deepfinalizeWithDepth".


      *>----------------------------------------------------------------
      *> Destroy this object, and all the elements in it up to a depth
      *> 1.
      *>----------------------------------------------------------------
       method-id. "deepfinalize".
       local-storage section.
       01 lsDepth              pic x(4) comp-5.
       linkage section.
       01 defaultreturn        usage object reference.

       procedure division returning defaultreturn.
           move 1 to lsDepth
           invoke self "deepfinalizeWithDepth" using lsDepth
                            returning defaultReturn
           exit method.
       end method "deepfinalize".
      *>----------------------------------------------------------------
      *> Destroy this object, and all the elements .
      *>----------------------------------------------------------------
       method-id. "reallydeepfinalize".
       local-storage section.
       01 lsDepth              pic x(4) comp-5.
       linkage section.
       01 defaultreturn        usage object reference.

       procedure division returning defaultreturn.
           move h"FFFFFFFF" to lsDepth
           invoke self "deepfinalizeWithDepth" using lsDepth
                            returning defaultReturn
           exit method.
       end method "reallydeepfinalize".
      *>----------------------------------------------------------------
      *> Return a string which contains the description of this object.
      *>----------------------------------------------------------------
       method-id. "description".
       local-storage section.
       01 i                        pic x(4) comp-5.
       01 j                        pic x(4) comp-5.
       01 description              object reference.
       01 lsmsgfh                  object reference.
       01 string1                  object reference.
       linkage section.
       01 aString                  usage object reference.
       procedure division returning aString.
           invoke self "registerBaseMessageFile"
                                returning lsmsgfh
           move 2 to i
           if self equal to null
               move 1 to j
               *>> LNG 1: "A static instance of %s"
           else
               move 2 to j
               *>> LNG 2: "An instance of %s"
           end-if
           invoke selfclass "Description" returning string1
           invoke lsmsgfh "getmessage" using i j string1
                    returning astring
           invoke string1 "finalize" returning string1
           invoke lsmsgfh "finalize" returning lsmsgfh
           exit method.
       end method "description".
      *>----------------------------------------------------------------
      *> Return the classname of this instance.
      *>----------------------------------------------------------------
       method-id. "className".
       linkage section.
       01 aString              usage object reference.
       procedure division returning aString.
           invoke selfclass "name" returning aString
           exit method.
       end method "className".
      *>----------------------------------------------------------------
      *> Display the recursive message for a recursive message.
      *>----------------------------------------------------------------

       method-id. "displayRecursion".
       local-storage section.
       01 aString                  usage object reference.
       01 i                        pic x(4) comp-5.
       01 j                        pic x(4) comp-5.
       01 lsmsgfh                  object reference.
       01 string1                  object reference.
       procedure division.
           invoke self "registerBaseMessageFile"
                                returning lsmsgfh
           *>> LNG 3: "...recursive reference to %s ..."
           invoke self "description" returning string1
           move 2 to i
           move 3 to j
           invoke lsmsgfh "getmessage" using i j string1
                    returning astring
           invoke aString "display"
           invoke string1 "finalize" returning string1
           invoke aString "finalize" returning aString
           invoke lsmsgfh "finalize" returning lsmsgfh
           exit method.
       end method "displayRecursion".
      *>----------------------------------------------------------------
      *> Display the value of the receiver. The default behaviour is to
      *> display the description of the receiver.
      *>----------------------------------------------------------------
       method-id. "display".
       local-storage section.
       01 aString  usage object reference.
       procedure division.
           invoke self "description" returning aString
           invoke aString "display"
           invoke aString "finalize" returning aString
           exit method.
       end method "display".
      *>----------------------------------------------------------------
      *> Return a shallow copy of the receiver
      *>----------------------------------------------------------------
       method-id. "basicCopy".
       local-storage section.
       01 exceptionnumber      pic x(4) comp-5.

       linkage section.
       01 result               usage object reference.

       procedure division returning result.
           if self equal to null
               move 27 to exceptionnumber
               invoke self "raiseException" using exceptionnumber
                                             returning result
           else
               call "oopsshallowcopy" using self returning result
               if result not = NULL
                  invoke "resetCache"
               end-if
           end-if
           exit method.
       end method "basicCopy".

      *>----------------------------------------------------------------
      *> Copy contents of this object into lnkObject.
      *> Returns true if the operation succeeded. Returns false if
      *> operation failed. May return false if the objects are of
      *> different sizes, or if this is an invalid operation for some
      *> objects.
      *>----------------------------------------------------------------

       method-id. "copyContents".
       local-storage section.
       01 result               pic x(4) comp-5.
       linkage section.
       01 lnkObject            usage object reference.
       01 lnkBool              pic x comp-5.
       procedure division using lnkObject
                        returning lnkBool.
           call "oopscopyobjectcontents" using by value self
                                               by value lnkObject
                                returning result
           if result = 0
                move zero to lnkBool
           else
                move 1 to lnkBool
           end-if
           exit method.
       end method "copyContents".

      *>----------------------------------------------------------------
      *> Return a shallow copy of the receiver. This method can be
      *> overridden but it is advised you do not override the method
      *> basicCopy.
      *>----------------------------------------------------------------
       method-id. "copy".
       local-storage section.
       01 exceptionnumber      pic x(4) comp-5.

       linkage section.
       01 result               usage object reference.

       procedure division returning result.
           if self equal to null
               move 27 to exceptionnumber
               invoke self "raiseException" using exceptionnumber
                                             returning result
           else
               call "oopsshallowcopy" using self returning result
               if result not = NULL
                  invoke "resetCache"
               end-if
           end-if
           exit method.
       end method "copy".


      *>----------------------------------------------------------------
      *> Return the class of the receiver
      *>----------------------------------------------------------------
       method-id. "class".
       linkage section.
       01 result               usage object reference.

       procedure division returning result.
           set result to selfclass
           exit method.
       end method "class".

      *>----------------------------------------------------------------
      *> Return a hash value for the receiver. Objects which are
      *> equal should return the same hash value.
      *>----------------------------------------------------------------
       method-id. "hash".
       linkage section.
       01 ahashvalue pic s9(9) comp-5.
       01 hashresult redefines ahashvalue usage object reference.
       01 result               usage object reference.

       procedure division returning ahashvalue.
           if self equal to null
               invoke self "implementedBySubClass" returning result
               exit method
           end-if
           set hashresult to self
           if ahashvalue < 0
               compute ahashvalue =  - ahashvalue
           end-if
           exit method.
       end method "hash".
      *>----------------------------------------------------------------
      *> Answer true if the receiver is sequenced, else answer false.
      *>----------------------------------------------------------------
       method-id. "isSequenced".
       linkage section.
       01 lnkbool               pic x comp-5.

       procedure division returning lnkbool.
           move 0 to lnkbool
           exit method.
       end method "isSequenced".
      *>----------------------------------------------------------------
      *> Answer true if the receiver is the desktop otherwise return
      *> false.
      *>----------------------------------------------------------------
       method-id. "isDesktop".
       linkage section.
       01 Bool pic x comp-5.
       procedure division returning bool.
           move 0 to bool
           exit method.
       end method "isDesktop".
      *>----------------------------------------------------------------
      *> Determine whether an object is equal to another object.
      *> The default behavior for this method is to determine whether
      *> they are identical.
      *>----------------------------------------------------------------
       method-id. "equal".
       linkage section.
       01 lnkbool               pic x comp-5.
           88 istrue  value 1.
           88 isfalse value 0.
       01 anobject             usage object reference.

       procedure division using anobject returning lnkbool.
           if self equal to null
               invoke self "implementedBySubclass" returning lnkbool
           else
               if self equal to anobject
                   set istrue to true
               else
                   set isfalse to true
               end-if
           end-if
           exit method.
       end method "Equal".
      *>----------------------------------------------------------------
      *> PRIVATE. Raise an exception as a message has been intercepted
      *> by a class when it should have been implemented by a subclass.
      *>----------------------------------------------------------------
       method-id. "implementedBySubClass".
       local-storage section.
       01 exceptionnumber      pic x(4) comp-5.

       linkage section.
       01 result               usage object reference.

       procedure division returning result.
           move 7 to exceptionnumber
           invoke self "raiseException" using exceptionnumber
                                         returning result
           exit method.
       end method "implementedBySubClass".
      *>----------------------------------------------------------------
      *> PRIVATE. Raise an exception as a message has been sent to an
      *> object when that object should not implement it.
      *>----------------------------------------------------------------
       method-id. "shouldNotImplement".
       local-storage section.
       01 exceptionnumber      pic x(4) comp-5.

       linkage section.
       01 result               usage object reference.

       procedure division returning result.
           move 16 to exceptionnumber
           invoke self "raiseException" using exceptionnumber
                                         returning result
           exit method.
       end method "shouldNotImplement".
      *>----------------------------------------------------------------
      *> Return the class of the receiver as the default implementation
      *> of species.
      *>----------------------------------------------------------------
       method-id. "species".
       linkage section.
       01 lnkClass             usage object reference.
       procedure division returning lnkClass.
           set lnkClass to selfClass
           exit method.
       end method "species".
      *>----------------------------------------------------------------
      *> PRIVATE. Raise an exception as a parameter is invalid.
      *>----------------------------------------------------------------
       method-id. "invalidParameter".
       local-storage section.
       01 exceptionnumber      pic x(4) comp-5.

       linkage section.
       01 result               usage object reference.

       procedure division returning result.
           move 33 to exceptionnumber
           invoke self "raiseException" using exceptionnumber
                                         returning result
           exit method.
       end method "invalidParameter".
      *>----------------------------------------------------------------
      *> Specify an object (aDelegate) that acts as the delegate for
      *> this object if the message is not understood
      *>----------------------------------------------------------------

       method-id. "setDelegate".
       linkage section.
       01 aDelegate        usage object reference.

       procedure division using aDelegate.
           invoke delegateManager "addDelegateFor" using self aDelegate
           exit method.
       end method "setDelegate".
      *>----------------------------------------------------------------
      *> Remove any delegate for this object.
      *>----------------------------------------------------------------

       method-id. "removeDelegate".
       procedure division.
           invoke delegateManager "remove" using self
           exit method.
       end method "removeDelegate".

      *>---------------------------------------------------------------
      *> Return true if this object is a type of popup otherwise return
      *> false.
      *>---------------------------------------------------------------
       method-id. "isPopUp".
       linkage section.
       01 lnkbool               pic x comp-5.
           88  lnkistrue      value 1.
           88  lnkisfalse     value 0.

       procedure division returning lnkbool.
           set lnkisfalse to true
           exit method.
       end method "isPopUp".
      *>---------------------------------------------------------------
      *> Return true if this object is a type of window otherwise
      *> return false.
      *>---------------------------------------------------------------
       method-id. "isWindow".
       linkage section.
       01 lnkbool               pic x comp-5.
           88  lnkistrue      value 1.
           88  lnkisfalse     value 0.

       procedure division returning lnkbool.
           set lnkisfalse to true
           exit method.
       end method "isWindow".
      *>---------------------------------------------------------------
      *> Return true if this object is a type of menubar otherwise
      *> return false.
      *>---------------------------------------------------------------
       method-id. "isMenubar".
       linkage section.
       01 lnkbool               pic x comp-5.
           88  lnkistrue      value 1.
           88  lnkisfalse     value 0.

       procedure division returning lnkbool.
           set lnkisfalse to true
           exit method.
       end method "isMenubar".
      *>---------------------------------------------------------------
      *> Return true if this object can be a parent of a menu.
      *>---------------------------------------------------------------
       method-id. "isMenuParent".
       linkage section.
       01 lnkbool               pic x comp-5.
           88  lnkistrue      value 1.
           88  lnkisfalse     value 0.

       procedure division returning lnkbool.
           set lnkisfalse to true
           exit method.
       end method "isMenuParent".
      *>------------------------------------------------------------
      *> Respond true if output signal lnkSignalId is defined for
      *> this component.
      *>------------------------------------------------------------
       Method-id. "isOutputSignal".
       local-storage section.
       01  lsSignalHandlerList        object reference.
       01  lsSignalId                 pic x(32).
       01  lsPointer                  pointer.
       01  i                          pic s9(9) comp-5.

       linkage section.
       01  lnkSignalId                pic x(32).
       copy "compnent.cpy".
       01  lnkBool                    pic x comp-5.
           88 isTrue                  value 1.
           88 isFalse                 value 0.

       procedure division using lnkSignalId returning lnkBool.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           move spaces to lsSignalId
           perform varying i from 1 by 1
                   until lnkSignalId(i:1) = x"00"
                   or    lnkSignalId(i:1) = space
               move lnkSignalId(i:1) to lsSignalId(i:1)
           end-perform
           invoke outputs "atOrNil" using lsSignalId(1:32)
                                returning lsSignalHandlerList
           if lsSignalHandlerList = null
               set isFalse to true
           else
               set isTrue to true
           end-if
           copy "csleave".
           exit method.
       end method "isOutputSignal".
      *>---------------------------------------------------------------
      *> Return true if this object is a process item.
      *>---------------------------------------------------------------
       method-id. "isProcessItem".
       linkage section.
       01 lnkbool               pic x comp-5.
           88  lnkistrue      value 1.
           88  lnkisfalse     value 0.

       procedure division returning lnkbool.
           set lnkisfalse to true
           exit method.
       end method "isProcessItem".
      *>---------------------------------------------------------------
      *> Return true if this object is a submenu.
      *>---------------------------------------------------------------
       method-id. "isSubMenu".
       linkage section.
       01 lnkbool               pic x comp-5.
           88  lnkistrue      value 1.
           88  lnkisfalse     value 0.

       procedure division returning lnkbool.
           set lnkisfalse to true
           exit method.
       end method "isSubMenu".
      *>---------------------------------------------------------------
      *> Default is to do nothing but return true so other idle
      *> interested parties can be called.
      *>---------------------------------------------------------------
       method-id. "doIdleProcessing".
       linkage section.
       01 lnkbool               pic x comp-5.
           88  lnkistrue      value 1.
           88  lnkisfalse     value 0.

       procedure division returning lnkbool.
           set lnkistrue to true
           exit method.
       end method "doIdleProcessing".
      *>--------------------------------------------------------------
      *> Allocate a new piece of memory which is lnkSize byes large,
      *> and return a pointer to it in lnkPtr.
      *>--------------------------------------------------------------
       method-id. "malloc".
       linkage section.
       01 lnkSize           pic x(4) comp-5.
       01 lnkPtr            usage pointer.

       procedure division using lnkSize returning lnkPtr.
           call "oopsallocmemory" using by value lnkSize
                                  returning lnkPtr
           exit method
       end method "malloc".
      *>----------------------------------------------------------------
      *> Deallocate memory pointed to by lnkPtr. This memory must have
      *> been allocated using malloc method.
      *>----------------------------------------------------------------
       method-id. "dealloc".
       linkage section.
       01 lnkPtr            usage pointer.
       procedure division using lnkPtr.
           call "oopsfreememory" using by value lnkPtr
           exit method.
       end method "dealloc".

      *>----------------------------------------------------------------
      *> By default prepareToBeSaved will do nothing. This is sent to
      *> each object immediately before it is saved to disk. To do
      *> anything useful a user must subclass and override this method.
      *>----------------------------------------------------------------
       method-id. "prepareToBeSaved".
       procedure division.
           exit method.
       end method "PrepareToBeSaved".


      *>----------------------------------------------------------------
      *> Change references to this object to point to lnkObject and
      *> vice versa. Care should be taken when invoking this method.
      *> It is not advised to send this message to a class or to send
      *> a class as a parameter.
      *>----------------------------------------------------------------
       method-id. "becomes".
       linkage section.
       01 lnkObject    usage object reference.
       procedure division using lnkObject.
           call "oopsbecomes" using self lnkObject
       end method "becomes".
      *>---------------------------------------------------------------
      *> Return the length of the object handle for any instance. This
      *> is mainly used for collections of intrinsic objects.
      *>---------------------------------------------------------------
       method-id. "size".
       linkage section.
       01 alength              pic x(4) comp-5.

       procedure division returning alength.
           move objectReferenceSize to alength
           exit method.
       end method "size".
      *>---------------------------------------------------------------
      *> Return the length of the object handle for any instance. This
      *> is mainly used for collections of intrinsic objects.
      *>---------------------------------------------------------------
       method-id. "sizeInBytes".
       linkage section.
       01 alength              pic x(4) comp-5.

       procedure division returning alength.
           invoke self "size" returning alength
           exit method.
       end method "sizeInBytes".

      *>--------------------------------------------------------------
      *> PRIVATE. Determine maximum levels of recursion
      *>--------------------------------------------------------------
       method-id. "levelsOfRecursion".
      $if MULTITHREADED defined
       thread-local-storage section.
      $else
       working-storage section.
      $end
       01 i pic x(4) comp-5 value 0.

       procedure division.
           add 1 to i
           display i
           invoke self "levelsOfRecursion"
           exit method.
       end method "levelsOfRecursion".
      *>----------------------------------------------------------------
      *> Return the message this object did not understand. This should
      *> only be called for a user defined exception handler for the
      *> doesnotunderstand message otherwise, you may get unpredictable
      *> results.
      *>----------------------------------------------------------------
       method-id. "whatdidntIUnderstand".
       local-storage section.
       01 anerrorclassname     pic x(30).
       01 anErrorMessage       pic x(160).
       linkage section.
       01 lnkString  usage object reference.
       procedure division returning lnkString.
           call "oopserrordetails" using self,
                                         anerrorclassname,
                                         anerrormessage
           invoke CharacterArray "withSpaceTerminator"
                            using anErrorMessage
                       returning lnkString
           exit method.
       end method "whatdidntIUnderstand".
      *>------------------------------------------------------------
      *> Set up a handler to translate a physical event on an object
      *> to a logical signal.
      *> Need to use standard event handler but make the callback
      *> invoke signal specifying signalId and pass parameter if
      *> provided
      *>------------------------------------------------------------
       Method-id. "translateEventToSignal".

       local-storage section.
       01  lsSignalString       object reference.

       linkage section.
       01  lnkEventId           pic s9(9) comp-5.
       01  lnksignalObject      object reference.
       01  lnkSignalId          pic x(32).
       01  lnkParameter         object reference.

       procedure division using lnkEventId
                                lnkSignalObject
                                lnkSignalId
                                lnkParameter.
           invoke CharacterArray "withSpaceOrNullTerminator"
                     using lnkSignalId returning lsSignalString
           invoke self "setEventTo" using lnkEventId
                                          lnkSignalObject
                                          "signalString "
                                          lsSignalString
                                          lnkParameter
           exit method.
       end method "translateEventToSignal".
      *>------------------------------------------------------------
      *> Defines an input socket for this component with socket id
      *> lnkSocketId. lnkSocketId must be a space- or null-terminated
      *> name which uniquely identifies the socket.
      *> You must invoke the method "makeComponent" to make an object
      *> into a component before you can define an input socket for it.
      *> For more information on Components and Signals see the topic
      *> Component Frameworks in the on-line documentation.
      *>------------------------------------------------------------
       Method-id. "defineInSocket".

       local-storage section.
       01  lsSocketConnections        object reference.
       01  lsStartingSocketSize       pic s9(9) comp-5.
       01  lsAssociation              usage object reference.
       01  lsSocketId                 pic x(32).
       01  i                          pic s9(9) comp-5.
       01  lsStandardSockets          pic s9(9) comp-5.
       01  lsClassName                object reference.
       01  lsClassNameText            pic x(64).
       01  lsPointer                 pointer.

       linkage section.
       01  lnkSocketId                pic x(32).
       copy "compnent.cpy".

       procedure division using lnkSocketId.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           move spaces to lsSocketId
           perform varying i from 1 by 1
                   until lnkSocketId(i:1) = x"00"
                   or    lnkSocketId(i:1) = space
               move lnkSocketId(i:1) to lsSocketId(i:1)
           end-perform
           move numberOfSocketSignals to lsStartingSocketSize
           invoke sockets "atOrNil" using lsSocketId
                        returning lsSocketConnections
           if lsSocketCOnnections = null
                invoke IdentityDictionary "ofValues"
                                           using picXToObject
                                                 lsStartingSocketSize
                                       returning lsSocketConnections
                if signalTracing
                    invoke self "className" returning lsClassName
                    move low-values to lsClassNameText
                    invoke lsClassName "getValue"
                       returning lsClassNameText
                    writetrace with "Defining input socket "
                               lsSocketId(1:32)
                               " for "
                               lsClassNameText
                end-if
                invoke sockets "atPut" using lsSocketId
                                        lsSocketConnections
           end-if
           copy "csleave".
           exit method.
       end method "defineInSocket".
      *>------------------------------------------------------------
      *> Connects the outputs of outputComponent to socket lnksocketID
      *> of inputComponent.
      *> You can connect an output component to any number of input
      *> sockets. Any input socket can be connected to the output of
      *> more than one component.
      *> Before you attempt to connect two components together you must
      *> first invoke the methods "makeComponent" on both components
      *> to make them into components, and invoke "defineOutSignal on
      *> the lnkOutputComponent to define all the signals it will want
      *> to send, and also invoke "defineInSocket" and "defineInSignal"
      *> on lnkInputComponent to define its input signals.
      *> For more information on Components and Signals see the topic
      *> Component Frameworks in the on-line documentation.
      *------------------------------------------------------------
       Method-id. "connect".

       local-storage section.
       01  lsOutputs                  object reference.
       01  lsMessage                  object reference.
       01  lsSocketId                 object reference.
       01  lsOutputComponent          object reference.
       01  lsInputComponent           object reference.
       01  lsSocketPicX               pic x(32).
       01  lsOutputPicX               pic x(64).
       01  lsInputPicX                pic x(64).
       01  lsPointer                  pointer.

       linkage section.
       01  lnkOutputComponent         object reference.
       01  lnkInputComponent          object reference.
       01  lnkSocketId                pic x(32).
       copy "compnent.cpy".

       procedure division using lnkOutputComponent,
                                lnkInputComponent,
                                lnkSocketId.
           call "oopsgetcomponentdata" using lnkOutputComponent
                        returning lsPointer
           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           invoke CharacterArray "withSpaceOrNullTerminator"
                     using lnkSocketId returning lsSocketId
           invoke lnkOutputComponent "getOutputs" returning lsOutputs
           invoke Callback "new" using lnkOutputComponent
                                       "copyConnection "
                                       lnkInputComponent
                                       lsSocketId
                             returning lsMessage
           if signalTracing
               invoke lnkOutputComponent "className"
                   returning lsOutputComponent
               move low-values to lsOutputPicX
               invoke lsOutputComponent "getValue"
                   returning lsOutputPicX
               invoke lnkInputComponent "className"
                   returning lsInputComponent
               move low-values to lsInputPicX
               invoke lsInputComponent "getValue"
                   returning lsInputPicX
               move low-values to lsSocketPicX
               invoke lsSocketId "getValue"
                   returning lsSocketPicX
               writetrace with "Connecting "
                               lsOutputPicX
                               " to "
                               lsInputPicX
                               " at socket "
                               lsSocketPicX
           end-if
           invoke lsOutputs "keysAndDataDo" using lsMessage
           invoke lsMessage "finalize" returning lsMessage
           invoke lsSocketId "finalize" returning lsSocketId
           copy "csleave".
           exit method.
       end method "connect".
      *>------------------------------------------------------------
      *> Connects the outputs of the receiver to socket lnksocketID
      *> of inputComponent.
      *> You can connect an output component to any number of input
      *> sockets. Any input socket can be connected to the output of
      *> more than one component.
      *> Before you attempt to connect two components together you must
      *> first invoke the methods "makeComponent" on both components
      *> to make them into components, and invoke "defineOutSignal on
      *> the output component to define all the signals it will want
      *> to send, and also invoke "defineInSocket" and "defineInSignal"
      *> on lnkInputComponent to define its input signals.
      *> For more information on Components and Signals see the topic
      *> Component Frameworks in the on-line documentation.
      *>------------------------------------------------------------
       Method-id. "connectTo".

       linkage section.
       01  lnkInputComponent          object reference.
       01  lnkSocketId                pic x(32).

       procedure division using lnkInputComponent,
                                lnkSocketId.
           invoke self "connect" using self lnkInputComponent,
                                lnkSocketId
           exit method.
       end method "connectTo".

      *>------------------------------------------------------------
      *> Spy on a component and define an object/method
      *> to be invoked when the component sends a signal.
      *>------------------------------------------------------------
       Method-id. "addSpy".
       local-storage section.
       01  lsCallback                  object reference.
       01  lsPointer                 pointer.

       linkage section.
       01  lnkObject                   object reference.
       01  lnkMethod                   object reference.
       copy "compnent.cpy".

       procedure division using lnkObject lnkMethod.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer

           copy "csenter".
           invoke Callback "new" using lnkObject
                                       lnkMethod
                             returning lsCallback
           invoke spies "add" using lsCallback
           copy "csleave".
           exit method.
       end method "addSpy".
      *>------------------------------------------------------------
      *> Spy on a component and define a callback to be invoked
      *> when the component sends a signal.
      *>------------------------------------------------------------
       Method-id. "addSpyCallback".
       local-storage section.
       01  lsPointer                 pointer.

       linkage section.
       01  lnkCallback                 object reference.
       copy "compnent.cpy".

       procedure division using lnkCallback.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           invoke spies "add" using lnkCallback
           copy "csleave".
           exit method.
       end method "addSpyCallback".
      *>------------------------------------------------------------
      *> Remove a spy.
      *>------------------------------------------------------------
       method-id. "removeSpy".

       Local-Storage Section.
       01  lsCallback              object reference.
       01  lsPointer                 pointer.

       Linkage Section.
       01  lnkComponent            object reference.
       copy "compnent.cpy".

       procedure division using lnkComponent.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           invoke Callback "new" using self
                                       "removeSpyCallback "
                                       lnkComponent
                             returning lsCallback
           invoke spies "do" using lsCallback
           invoke lsCallback "finalize" returning lsCallback
           copy "csleave".
           exit method.
       end method "removeSpy".
      *>------------------------------------------------------------
      *> Remove a spy CallBack.
      *>------------------------------------------------------------
       method-id. "removeSpyCallback".

       Local-Storage Section.
       01  lsReceiver              object reference.
       01  lsPointer                 pointer.

       Linkage Section.
       01  lnkCallback             object reference.
       01  lnkComponent            object reference.
       copy "compnent.cpy".

       procedure division using lnkComponent
                                lnkCallback.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           invoke lnkCallback "getReceiver" returning lsReceiver
           if lsReceiver = lnkComponent
               invoke spies "remove" using lnkCallback
               invoke lnkCallback "finalize" returning lnkCallback
           end-if
           copy "csleave".
           exit method.
       end method "removeSpyCallback".
      *>------------------------------------------------------------
      *> PRIVATE.
      *>------------------------------------------------------------

       method-id. "sendToSpy".

       Local-Storage Section.

       Linkage Section.
       01  lnkSignalId            pic x(32).
       01  lnkCallback            object reference.
       01  muteFlag               pic s9(9) comp-5.

       procedure division using lnkSignalId muteFlag lnkCallback.
           invoke lnkCallback "invoke" using self
                                             lnkSignalId
                                             muteFlag
           exit method.
       end method "sendToSpy".
      *>------------------------------------------------------------
      *> PRIVATE. Return the sockets Dictionary
      *>------------------------------------------------------------
       Method-id. "getSocket".

       local-storage section.
       01  lsPointer                 pointer.

       linkage section.
       01  lnkSocket           object reference.
       01  lnkSocketId         pic x(32).
       copy "compnent.cpy".

       procedure division using lnkSocketId
                      returning lnkSocket.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           if sockets <> null
               invoke sockets "atOrNil"
                                   using     lnkSocketId
                                   returning lnkSocket
           else
               raise exception inputSocketUndefined
           end-if
           copy "csleave".
           exit method.
       end method "getSocket".
      *>------------------------------------------------------------
      *> PRIVATE. Return the outputs Dictionary
      *>------------------------------------------------------------
       Method-id. "getOutputs".

       local-storage section.
       01  lsPointer                 pointer.

       linkage section.
       01  lnkOutputs          object reference.
       copy "compnent.cpy".

       procedure division returning lnkOutputs.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           set lnkOutputs to outputs
           copy "csleave".
           exit method.
       end method "getOutputs".
      *>---------------------------------------------------------
      *> Registers a particular CallBack for an event which this
      *> object may receive. The event is identified by an event
      *> index. See the file P2CEVENT.CPY.
      *> Warning, presently there is no error detection on trying
      *> to register callbacks for events that objects can't
      *> possibly receive. For example an exception WOULD NOT be
      *> raised if the user tried to register a callback for
      *> a resize event on a button. The effect would be that the
      *> callback would never get called.
      *>---------------------------------------------------------
       method-id. "setEvent".
       local-storage section.
       01 lsEventHandler               object reference.
       01 lsEventDictionary            object reference.
       01 lsHandlersAssoc              object reference.
       01 lsEventHandlerDict           object reference.
       01 lsTranslateHandlerDict       object reference.
       01 lsNumberHandlers             pic x(4) comp-5.

       linkage section.
       01 lnkEventIndex            pic s9(9) comp-5.
       01 lnkEventHandler          object reference.

       procedure division using lnkEventIndex lnkEventHandler.
           invoke SystemDictionary "atZ" using
                                         "MFCLEventHandlers" & x"00"
                                returning lsEventDictionary
           if lsEventDictionary = null
               move numberOfEventObjects to lsNumberHandlers
               invoke IdentityDictionary "ofValues" using Association
                                                    lsNumberHandlers
                                          returning lsEventDictionary
               invoke SystemDictionary "atZPut" using
                                         "MFCLEventHandlers" & x"00"
                                         lsEventDictionary
           end-if
           invoke lsEventDictionary "atOrNil" using self
                                          returning lsHandlersAssoc
           if lsHandlersAssoc = null
               move numberOfRegisteredEvents to lsNumberHandlers
               invoke IdentityDictionary "ofValues"
                           using cobolcomp5association
                                 lsNumberHandlers
                       returning lsEventHandlerDict
               invoke IdentityDictionary "ofValues"
                           using cobolcomp5association
                                 lsNumberHandlers
                       returning lsTranslateHandlerDict
               invoke Association "keyData" using
                                        lsTranslateHandlerDict
                                        lsEventHandlerDict
                              returning lsHandlersAssoc

               invoke lsEventDictionary "atPut" using self
                                                      lsHandlersAssoc
           else
               invoke lsHandlersAssoc "getData"
                            returning lsEventHandlerDict
           end-if
           invoke lnkEventhandler "copy" returning lsEventHandler
           invoke lsEventHandlerDict "atPut" using lnkEventIndex
                                                   lsEventhandler
           exit method.
       end method "setEvent".

      *>---------------------------------------------------------
      *> Translate the event lnkEventIndex for this object into
      *> the event lnkTranslatedEvent on lnkReceiver.
      *>---------------------------------------------------------
       method-id. "translateEvent".
       local-storage section.
       01 lsAssoc                      object reference.
       01 lsEventDictionary            object reference.
       01 lsHandlersAssoc              object reference.
       01 lsEventHandlerDict           object reference.
       01 lsTranslateHandlerDict       object reference.
       01 lsNumberHandlers             pic x(4) comp-5.

       linkage section.
       01 lnkEventIndex                pic s9(9) comp-5.
       01 lnkTranslatedEvent           pic s9(9) comp-5.
       01 lnkReceiver                  object reference.

       procedure division using lnkEventIndex lnkReceiver
                                lnkTranslatedEvent.
           if lsEventDictionary = null
               move numberOfEventObjects to lsNumberHandlers
               invoke IdentityDictionary "ofValues" using Association
                                                    lsNumberHandlers
                                          returning lsEventDictionary
               invoke SystemDictionary "atZPut" using
                                         "MFCLEventHandlers" & x"00"
                                         lsEventDictionary
           end-if
           invoke lsEventDictionary "atOrNil" using self
                                          returning lsHandlersAssoc
           if lsHandlersAssoc = null
               move numberOfRegisteredEvents to lsNumberHandlers
               invoke IdentityDictionary "ofValues"
                           using cobolcomp5association
                                 lsNumberHandlers
                       returning lsEventHandlerDict
               invoke IdentityDictionary "ofValues"
                           using cobolcomp5association
                                 lsNumberHandlers
                       returning lsTranslateHandlerDict
               invoke Association "keyData" using
                                        lsTranslateHandlerDict
                                        lsEventHandlerDict
                              returning lsHandlersAssoc

               invoke lsEventDictionary "atPut" using self
                                                      lsHandlersAssoc
           end-if
           invoke cobolcomp5Association "keyData" using
                                        lnkTranslatedEvent lnkReceiver
                              returning lsAssoc
           invoke lsTranslateHandlerDict "atPut" using lnkEventIndex
                                                       lsAssoc
           exit method.
       end method "translateEvent".
      *>---------------------------------------------------------
      *> Invoke the associated event handler for the event
      *> lnkEventIndex.
      *>---------------------------------------------------------
       method-id. "doEvent".
       local-storage section.
       01 lsEvent                  object reference.

       linkage section.
       01 lnkEventIndex            pic s9(9) comp-5.
       01 lnkResult                object reference.
       procedure division using lnkEventIndex returning lnkResult.
      *----Create an event object and invoke the CallBack.
           invoke Event "new" returning lsEvent
           invoke lsEvent "setObject" using self
           invoke lsEvent "setId" using lnkEventIndex
           invoke self "dispatchEvent" using lsEvent
                                   returning lnkResult
           invoke lsEvent "finalize" returning lsEvent
           exit method.
       end method "doEvent".
      *>---------------------------------------------------------
      *> Dispatch the event lnkEvent to methods registered for the
      *> event if they exist. You can register a method against an
      *> event by using the "setEventTo" method.
      *>
      *>#See method "setEventTo".
      *>#See class "event".
      *>
      *>---------------------------------------------------------
       method-id. "dispatchEvent".
       local-storage section.
       01 lsEventDictionary        object reference.
       01 lsHandlersAssoc          object reference.
       01 lsEventHandlers          object reference.
       01 lsTranslateHandlers      object reference.
       01 lsEventMethod            object reference.
       01 lsObject                 object reference.
       01 lsTranslateAssoc         object reference.
       01 lsEventIndex             pic x(4) comp-5.

       linkage section.
       01 lnkResult                object reference.
       01 lnkEvent                 object reference.

       procedure division using lnkEvent returning lnkResult.
      *----Get the event handling dictionary from the system dictionary.
           invoke SystemDictionary "atZ" using
                                         "MFCLEventHandlers" & x"00"
                                returning lsEventDictionary
           if lsEventDictionary <> null
               invoke lsEventDictionary "atOrNil" using self
                                              returning lsHandlersAssoc
               if lsHandlersAssoc <> null
                   invoke lnkEvent "getId" returning lsEventIndex
      *------------Get the translate events dictionary
                   invoke lsHandlersAssoc "getKey"
                                      returning lsTranslateHandlers
      *------------Get the method events dictionary
                   invoke lsHandlersAssoc "getData"
                                          returning lsEventHandlers
      *------------Get the CallBack for this event, if there is one
                   invoke lsEventHandlers "atOrNil" using lsEventIndex
                                                returning lsEventMethod
                   if lsEventMethod <> null
                      invoke lsEventMethod "invoke" using lnkEvent
                                                returning lnkResult
                   end-if
      *------------Get the translation for this event, if there is one
                   invoke lstranslatehandlers "atOrNil"
                                               using lsEventIndex
                                           returning lsTranslateAssoc
                   if lsTranslateAssoc <> null
      *----------------Get event index and object to map lnkEvent to
                       invoke lsTranslateAssoc "getKey"
                                             returning lsEventIndex
                       invoke lsTranslateAssoc "getData"
                                             returning lsObject
                       invoke lsObject "doEvent" using lsEventIndex
                                             returning lnkResult
                   end-if
               end-if
           end-if
            exit method.
       end method "dispatchEvent".
      *>---------------------------------------------------------
      *> PRIVATE. Remember lnkObject is dependant on this
      *> object.
      *>---------------------------------------------------------
       method-id. "addSignalDependant".

       Local-Storage Section.
       01  lsPointer                 pointer.

       Linkage Section.
       01  lnkObject             object reference.
       copy "compnent.cpy".

       procedure division using lnkObject.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           invoke dependants "add" using lnkObject
           copy "csleave".
           exit program.
       end method "addSignalDependant".
      *>---------------------------------------------------------
      *> PRIVATE. Disconnect this component from any output
      *> signal callbacks.
      *>---------------------------------------------------------
       method-id. "disconnect".

       Local-Storage Section.
       01 lsBool                   usage object reference.
       01 lsCallback              object reference.
       01 lsPointer               pointer.

       Linkage Section.
       copy "compnent.cpy".

       procedure division.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           if dependants <> null
               invoke Callback "new" using self
                                           "disconnectInstance "
                                 returning lsCallback
               invoke dependants "do" using lsCallback
               invoke dependants "finalize" returning dependants
               invoke lsCallback "finalize" returning lsCallback
           end-if
           if outputs <> null
               invoke Callback "new" using self
                                           "removeSignalDependents "
                                 returning lsCallback
               invoke outputs "do" using lsCallback
               invoke lsCallback "finalize" returning lsCallback
           end-if
           invoke ExceptionManager "cancel" using self
                   returning lsBool
           invoke outputs "reallydeepFinalize" returning outputs
           invoke spies "finalize" returning spies
           invoke sockets "reallydeepFinalize" returning sockets
           copy "csleave".
           exit method.
       end method "disconnect".
      *>---------------------------------------------------------
      *> PRIVATE. Invoked as part of the disconnection iteration
      *>---------------------------------------------------------
       method-id. "disconnectInstance".

       Local-Storage Section.

       Linkage Section.
       01  lnkComponent            object reference.

       procedure division using lnkComponent.
           invoke lnkComponent "removeHandler" using self
           exit method.
       end method "disconnectInstance".

      *>---------------------------------------------------------
      *> PRIVATE. Invoked as part of the disconnection iteration
      *>---------------------------------------------------------
       method-id. "removeHandler".

       Local-Storage Section.
       01  lsCallback              object reference.
       01  bool                    pic x comp-5.
           88 isTrue               value 1.
       01  lsPointer                 pointer.

       Linkage Section.
       01  lnkComponent            object reference.
       copy "compnent.cpy".

       procedure division using lnkComponent.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           if outputs <> null
               invoke dependants "includes" using lnkComponent
                                        returning bool
               if isTrue
      *------------make sure we don't refer to a finalized object
                   invoke dependants "remove" using lnkComponent
               end-if
               invoke Callback "new" using self
                                           "disconnectSignals "
                                           lnkComponent
                                 returning lsCallback
               invoke outputs "do" using lsCallback
               invoke lsCallback "finalize" returning lsCallback
           end-if
           copy "csleave".
           exit method.
       end method "removeHandler".
      *>---------------------------------------------------------
      *> PRIVATE. Invoked as part of the disconnection iteration
      *>---------------------------------------------------------
       method-id. "disconnectSignals".

       Local-Storage Section.
       01  lsCallback              object reference.

       Linkage Section.
       01  lnkSignalHandlers       object reference.
       01  lnkComponent            object reference.

       procedure division using lnkComponent lnkSignalHandlers.
           invoke Callback "new" using self
                                       "disconnectCallback "
                                       lnkSignalHandlers
                                       lnkComponent
                             returning lsCallback
           invoke lnkSignalHandlers "do" using lsCallback
           invoke lsCallback "finalize" returning lsCallback
           exit method.
       end method "disconnectSignals".

      *>---------------------------------------------------------
      *> PRIVATE. Invoked as part of the disconnection iteration
      *>---------------------------------------------------------
       method-id. "disconnectCallback".

       Local-Storage Section.
       01  lsReceiver              object reference.

       Linkage Section.
       01  lnkSignalHandlers       object reference.
       01  lnkCallback             object reference.
       01  lnkComponent            object reference.

       procedure division using lnkSignalHandlers
                                lnkComponent
                                lnkCallback.
           invoke lnkCallback "getReceiver" returning lsReceiver
           if lsReceiver = lnkComponent
               invoke lnkSignalHandlers "remove" using lnkCallback
               invoke lnkCallback "finalize" returning lnkCallback
           end-if
           exit method.
       end method "disconnectCallback".

      *>------------------------------------------------------------
      *> Cause exception to be generated on duplicate signal
      *> definition
      *>------------------------------------------------------------
       method-id. "duplicatesNotOK".
       local-storage section.
       01  lsPointer               pointer.

       linkage section.
       copy "compnent.cpy".

       procedure division.
           call "oopsgetcomponentdata" using self
                        returning lsPointer
           set address of componentInstanceData
           to lsPointer
           copy "csenter".
           set duplicatesOK to false
           copy "csleave".
           exit method.
       end method "duplicatesNotOK".
      *>------------------------------------------------------------
      *> Duplicate signal definition is ignored
      *>------------------------------------------------------------
       method-id. "duplicatesOK".

       local-storage section.
       01  lsPointer               pointer.

       linkage section.
       copy "compnent.cpy".

       procedure division.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           set duplicatesOK to true
           copy "csleave".
           exit method.
       end method "duplicatesOK".


      *>----------------------------------------------------------------
      *> Turns this object into a component.
      *> For more information on Components and Signals see the topic
      *> Component Frameworks in the on-line documentation.
      *>----------------------------------------------------------------
       method-id. "makeComponent".
      $if MULTITHREADED defined
       thread-local-storage section.
      $else
       working-storage section.
      $end
       01  wsExceptionMethod         object reference.


       local-storage section.
       01  lsPtr         usage pointer.
       01  lsbool                pic x comp-5.
           88  istrue            value 1.
           88  isfalse           value 0.
       01  i                     pic s9(9) comp-5.       

       linkage section.
       copy "compnent.cpy".

       procedure division.
           invoke self "isComponent" returning lsbool
           if isFalse
               move length of componentInstanceData to i
               invoke self "malloc" using i
                        returning lsPtr
               if lsPtr = null
                   move 32 to i
                   invoke self "raiseException" using i
               else
                   call "oopssetcomponentdata" using self lsPtr

                   set address of componentInstanceData
                                   to  lsPtr
                   copy "csinit".
                   copy "csenter".
                   invoke self "isSignalTracing" returning tracingFlag
                   move numberOfStandardOutputs to i
                   invoke IdentityDictionary "ofValues"
                                           using picXToObject
                                                 i
                                       returning outputs
                   move numberOfStandardSockets to i
                   invoke IdentityDictionary "ofValues"
                                            using picXToObject
                                                  i
                                        returning sockets
                   move numberofStandardDependants to i
                   invoke IdentitySet "ofReferences"
                                  using i
                              returning dependants
                   move numberofStandardSpies to i
                   invoke OrderedCollection "ofReferences"
                                  using i
                              returning spies
                   set duplicatesOK to true
                   if wsExceptionMethod = null
                      invoke Callback "new"
                        using self "componentException "
                             returning wsExceptionMethod
                   end-if
                   invoke ExceptionManager "register" using self
                                          wsExceptionMethod

                   copy "csleave".
               end-if
           end-if
           exit method.
       end method "makeComponent".


      *>----------------------------------------------------------------
      *> PRIVATE. Determine if this instance is a component
      *>----------------------------------------------------------------
       method-id. "isComponent".
       local-storage section.
       01 lspointer            pointer.
       linkage section.
       01  lnkbool             pic x comp-5.
           88  istrue          value 1.
           88  isfalse         value 0.

       procedure division returning lnkbool.
           call "oopsgetcomponentdata" using self
                        returning lsPointer
           if lspointer = null
               set isFalse to true
           else
               set isTrue to true
           end-if
           exit method.
       end method "isComponent".
      *>----------------------------------------------------------------
      *> PRIVATE. Returns true if object is indexed. Is overridden by
      *> indexed collection classes.
      *>----------------------------------------------------------------
       method-id. "isIndexed".
       local-storage section.

       linkage section.
       01 lnkBool              pic x comp-5.
           88  isTrue          value 1.
           88  isFalse         value 0.

       procedure division returning lnkbool.
           set isFalse to true
           exit method.
       end method "isIndexed".


      *>----------------------------------------------------------------
      *> PRIVATE. Returns true if object is a gadget.
      *>----------------------------------------------------------------
       method-id. "isGadget".
       local-storage section.

       linkage section.
       01 lnkBool              pic x comp-5.
           88  isTrue          value 1.
           88  isFalse         value 0.

       procedure division returning lnkbool.
           set isFalse to true
           exit method.
       end method "isGadget".

      *>----------------------------------------------------------------
      *> PRIVATE. Write a trace record
      *>----------------------------------------------------------------
       method-id. "trace".

       local-storage section.

       linkage section.
       01 lnkRecord               pic x.

       procedure division using lnkRecord.
           call "oopstrace" using lnkRecord
           exit method.
       end method "trace".
      *>------------------------------------------------------------
      *> PRIVATE. Concatenate characterarry, finalize both and
      *> return new characterarray
      *>------------------------------------------------------------
       Method-id. "concatTrace".
       local-storage section.
       01  temp                object reference.

       linkage section.
       01  firstString         object reference.
       01  secondString        object reference.

       procedure division using firstString, secondString.
           invoke firstString "concat" using secondString
                               returning temp
           invoke firstString "finalize" returning firstString
           invoke secondString "finalize" returning secondString
           set firstString to temp
           exit method.
       end method "concatTrace".
      *>------------------------------------------------------------
      *> PRIVATE. Determine if signal tracing and set instance flag
      *>------------------------------------------------------------
       Method-id. "isSignalTracing".
       local-storage section.
       01  signalTracing       pic s9(9) comp-5 value 65536.
       01  traceLevel          pic s9(9) comp-5.

       linkage section.
       01  lnkBool             pic x comp-5.
           88 isTrue           value 1.
           88 isFalse          value 0.

       procedure division returning lnkBool.
           move 65536 to signalTracing
           call "oopsgettracelevel" returning traceLevel
           call "CBL_AND" using signalTracing, tracelevel
                                by value 4
           if traceLevel = signalTracing
               set isTrue to true
           else
               set isFalse to true
           end-if
           exit method.
       end method "isSignalTracing".

      *>------------------------------------------------------------
      *> Return the level of trace.
      *> Bit 0 - Normal message tracing
      *> Bit 1 - Allocation tracing
      *> Bit 2 - Class and extension method registering
      *> Bit 3 - Trace timing
      *> Bit 4 - Undefined
      *> Bit 5 - Undefined
      *> Bit 6 - Undefined
      *> Bit 7 - Undefined
      *> Bit 8 - Undefined
      *> Bit 9 - Undefined
      *> Bit 10- Undefined
      *> Bit 11- Undefined
      *> Bit 12- Undefined
      *> Bit 13- Undefined
      *> Bit 14- Undefined
      *> Bit 15- Undefined
      *> Bit 16- Signal Tracing
      *> Remainder user defined
      *>------------------------------------------------------------
       Method-id. "getTraceLevel".
       linkage section.
       01 lnktraceLevel          pic s9(9) comp-5.
       procedure division returning lnktraceLevel.
           call "oopsgettracelevel" returning lnktraceLevel
           exit method.
       end method "getTraceLevel".


      *>------------------------------------------------------------
      *> Set the level of trace.
      *> Bit 0 - Normal message tracing
      *> Bit 1 - Allocation tracing
      *> Bit 2 - Class and extension method registering
      *> Bit 3 - Trace timing
      *> Bit 4 - Undefined
      *> Bit 5 - Undefined
      *> Bit 6 - Undefined
      *> Bit 7 - Undefined
      *> Bit 8 - Undefined
      *> Bit 9 - Undefined
      *> Bit 10- Undefined
      *> Bit 11- Undefined
      *> Bit 12- Undefined
      *> Bit 13- Undefined
      *> Bit 14- Undefined
      *> Bit 15- Undefined
      *> Bit 16- Signal Tracing
      *> Remainder user defined

      *>------------------------------------------------------------
       Method-id. "setTraceLevel".
       linkage section.
       01 lnktraceLevel          pic s9(9) comp-5.
       procedure division using lnktraceLevel.
           call "oopssettracelevel" using lnktraceLevel
           exit method.
       end method "setTraceLevel".

      *>----------------------------------------------------------------
      *> Raise an exception indicating two collections are incompatible.
      *>----------------------------------------------------------------
       method-id. "CompatibilityError".
       local-storage section.
       01 exceptionNumber  pic x(4) comp-5.
       linkage section.
       01 lnkResult        usage object reference.
       procedure division returning lnkResult.
           move 10 to exceptionnumber
           invoke self "raiseException" using exceptionnumber
                                             returning lnkResult.
           exit method.
       end method "CompatibilityError".

      *>----------------------------------------------------------------
      *> Return true if this type of collection contains characters
      *>----------------------------------------------------------------
       method-id. "containsCharacters".
       linkage section.
       01 lnkbool                pic x comp-5.
           88  lnkistrue          value 1.
           88  lnkisfalse         value 0.
       01 acollection          usage object reference.

       procedure division returning lnkbool.
           set lnkIsFalse to true
           exit method.
       end method "ContainsCharacters".

      *>----------------------------------------------------------------
      *> Return true if this type of collection contains
      *> DBCS characters
      *>----------------------------------------------------------------
       method-id. "containsDBCSCharacters".
       linkage section.
       01 lnkbool                pic x comp-5.
           88  lnkistrue          value 1.
           88  lnkisfalse         value 0.
       01 acollection          usage object reference.

       procedure division returning lnkbool.
           set lnkIsFalse to true
           exit method.
       end method "ContainsDBCSCharacters".

      *>----------------------------------------------------------------
      *> Return true if this instance is an instance of the class
      *> lnkClass or if its class inherits either directly or indirectly
      *> from lnkClass.
      *>----------------------------------------------------------------
       method-id. "isTypeOf".
       local-storage section.
       01 lsClass                usage object reference.
       linkage section.
       01 lnkbool                pic x comp-5.
       01 lnkClass               usage object reference.

       procedure division using lnkClass returning lnkbool.
           set lsclass to selfclass
           perform until lsclass = lnkClass or lsclass = base
                invoke lsclass "superClass" returning lsclass
           end-perform
           if lsclass = lnkClass
                move 1 to lnkBool
           else
                move 0 to lnkBool
           end-if
           exit method.
       end method "isTypeOf".
      *>---------------------------------------------------------
      *> PRIVATE. Iterator used to remove a signal dependant
      *>---------------------------------------------------------
       method-id. "removeSignalDependents".

       Local-Storage Section.
       01  lsCallback              object reference.
       01  lsSize                  pic x(4) comp-5.

       Linkage Section.
       01  lnkSignalHandlers       object reference.

       procedure division using lnkSignalHandlers.
           invoke Callback "new" using self
                                       "doRemoveSignalDependant "
                             returning lsCallback
           invoke lnkSignalHandlers "do" using lsCallback
           invoke lsCallback "finalize" returning lsCallback
           invoke lnkSignalHandlers "size" returning lsSize
           invoke lnkSignalHandlers "removefirst" using lsSize
       end method "removeSignalDependents".

      *>---------------------------------------------------------
      *> PRIVATE. iterator to remove a signal dependant
      *>---------------------------------------------------------
       method-id. "doRemoveSignalDependant".

       Local-Storage Section.
       01  lsReceiver              object reference.

       Linkage Section.
       01  lnkCallback             object reference.

       procedure division using lnkCallback.
           invoke lnkCallback "getReceiver" returning lsReceiver
           invoke lsReceiver "removeSignalDependant" using self

      *> now remove the output callback
           invoke lnkCallback "finalize" returning lnkCallback
       end method "doRemoveSignalDependant".

      *>---------------------------------------------------------
      *> Removes lnkObject from the signal dependency
      *> list.
      *>---------------------------------------------------------
       method-id. "removeSignalDependant".

       Local-Storage Section.
       01  lsPointer               pointer.
       01  lsBool                  pic x comp-5.
           88 isTrue               value 1.

       Linkage Section.
       01  lnkObject               object reference.
       copy "compnent.cpy".

       procedure division using lnkObject.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           invoke dependants "includes" using     lnkObject
                                        returning lsBool
           if isTrue
               invoke dependants "remove" using lnkObject
           end-if
       end method "removeSignalDependant".


      *>----------------------------------------------------------------
      *> Dummy method so we can write a trigger to run a class.
      *>----------------------------------------------------------------
       method-id. "readyForApplicationStart".
       procedure division.
           exit method.
       end method "readyForApplicationStart".

      *>----------------------------------------------------------------
      *> Return 0 inidcating this is not a COBOL Comp-5 object.
      *>----------------------------------------------------------------
       method-id. "isComp5".
       linkage section.
       01 lnkBool          pic x comp-5.

       procedure division returning lnkBool.
           move 0 to lnkBool
           exit method.
       end method "isComp5".

      *>----------------------------------------------------------------
      *> Return 0 inidcating this is not a COBOL Comp-X object.
      *>----------------------------------------------------------------
       method-id. "isCompX".
       linkage section.
       01 lnkBool          pic x comp-5.

       procedure division returning lnkBool.
           move 0 to lnkBool
           exit method.
       end method "isCompX".

      *>---------------------------------------------------------
      *> PRIVATE. DisconnectOutputs
      *>---------------------------------------------------------
       method-id. "disconnectOutputs".

       Local-Storage Section.
       01 lsBool                   usage object reference.
       01 lsCallback              object reference.
       01 lsPointer               pointer.

       Linkage Section.
       copy "compnent.cpy".

       procedure division.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           if outputs <> null
      *> remove the dependency of another object on output
      *> signals of this object         
               invoke Callback "new" using self
                                           "removeSignalDependents "
                                 returning lsCallback
               invoke outputs "do" using lsCallback
               invoke lsCallback "finalize" returning lsCallback
           end-if
           copy "csleave".
           exit method.
       end method "disconnectOutputs".
      *>---------------------------------------------------------
      *> PRIVATE. DisconnectInputs
      *>---------------------------------------------------------
       method-id. "disconnectInputs".

       Local-Storage Section.
       01 lsBool                   usage object reference.
       01 lsCallback              object reference.
       01 lsPointer               pointer.
       01 lsSize                  pic x(4) comp-5.
       Linkage Section.
       copy "compnent.cpy".

       procedure division.
           call "oopsgetcomponentdata" using self
                        returning lsPointer

           set address of componentInstanceData
           to  lsPointer
           copy "csenter".
           if dependants <> null
               invoke Callback "new" using self
                                           "disconnectInstance "
                                 returning lsCallback
               invoke dependants "do" using lsCallback
               invoke dependants "removeAll" using dependants

               invoke lsCallback "finalize" returning lsCallback
           end-if
           copy "csleave".
           exit method.
       end method "disconnectInputs".



      *>----------------------------------------------------------------
      *> Return false this is not a metaclass.
      *>----------------------------------------------------------------
       method-id. "isMetaClass".
       local-storage section.
       linkage section.
       01 lnkBool        pic x comp-5.
       procedure division returning lnkBool.
            move zero to lnkBool
            exit program.
       end method "isMetaClass".




      *>----------------------------------------------------------------
      *> Return a copy of this object.
      *>----------------------------------------------------------------
       method-id. "deepCopy".
       local-storage section.
       linkage section.
       01 lnkCopy                usage object reference.

       procedure division returning lnkCopy.
            invoke self "copy" returning lnkCopy
            exit program.
       end method "deepCopy".
      *>----------------------------------------------------------------
      *>
      *>----------------------------------------------------------------
       method-id. "resetCache".
       procedure division.
            exit program.
       end method "resetCache".
      *>----------------------------------------------------------------
      *> ISO2002 base class library method. Return the oject reference
      *> for the factory object of the current instance object.
      *>----------------------------------------------------------------

       method-id. "FactoryObject".
       linkage section.
       1 lnkObj usage object reference.
       procedure division returning lnkObj.
           move selfclass to lnkObj
           exit method.
       end method "FactoryObject".

       end object.
       end class base.
