SetPattern

SetPattern(CX_xxxxx, bitPattern)

Parameter:  Class Identifier, bit pattern

Stack
Stack   Description
Stack(In)   -
Stack(Out)   -

According to the idea of polymorphism, an object that has been created with CreatePersObject shall often not only - or even not at all - be put into the Root EP Collection of its class. Instead, it shall be put into the collection of a basic class, together with instances of other derived classes. This behavior is determined for the class that has been indicated in the first class. The second parameter bits represent inheritance path classes, starting on the right:

     classes:      .  .  .  C3 --> C2 --> C1 --> C 
     bitPattern    .  .  .  b3       b2      b1      b0

with C being derived from C1, C1 from C2, C2 from C3 etc... Default value can be set in the initialization file CLASSIX.INI. In case there is no specification, it is automatically 1, meaning the object will be Root EP Collection element of its class. Value zero means: The object will be put into no  Root EP Collection. It can only be accessed via relations from another object.
The following Example shows the connection between Layer, Domain and Bit Pattern for Inheritance.

Example

// All CX_TXN_NOTE objects will now be registered in its own collection

// and in the CX_TRANSACTION collection (one level above) also:
SetPattern
(CX_TXN_NOTE, 3)
CreatePersObject(CX_TXN_NOTE) -> txnNote // Is now registered in the two collections!

See also