PreviousNext

A Complete Object

The previous topics described how an object is created: you look up the rules for the object class you require, and then add the attributes called for in the definition. Whenever some attribute is defined to have an object as its value, you have to look up the class rules for the new object and declare a further descriptor array for it. In this way you continue working down through layers of subobjects until you reach an object class that contains no subobjects as values; at that point, you are finished.

Normally, you do not statically declare objects in real applications. The steps outlined in the preceding text are given as a method for determining what an object looks like. Once you have done that, you can then write routines to create the objects dynamically. An example of how to do this can be found in the teldir.c example application in Sample Application Programs of this guide.

The process of object building is somewhat easier than it sounds. There are only five different object classes needed for input to XDS functions when accessing CDS, and only one of those, the DS_C_DS_DN class, has more than one level of subobjects. The rules for all five of these classes can be found in Part 4 of this guide. In order to use the GDS references, you should know a few things about class hierarchy.