A data model is a template used by ADI to create data structures for the storage and manipulation of information. Such a structure for a HDS container file stores the file name, access mode, locator for the container file, sub-structure within the file and the depth at which information is being accessed.
The data model for the new package is defined in the file new.adi, which is stored at the location /star/asterix/kernel/etc/ and installed in the directory $AST_ETC.
The model contains the following definitions
;; The rest of this line is a comment ;; defclass Data { CHAR Type, ;; Basic data type Shape, ;; Its dimensions LOGICAL Modified = False, ;; Has the data been altered? Value ;; The data } defclass Image Data { CHAR Name, ;; Name of object }
The class Image extends the class Data as defined earlier in the file. This corresponds to the string _Image as used in calls to the subroutine ADI_DEFFUN. Each definition line has the following format,
TYPE NAME [= Initial value]
Where TYPE is one of LOGICAL, [U]BYTE, INTEGER, REAL, CHAR or STRUC. The type STRUC refers to an object previously defined with a call to defclass. Where the TYPE is blank a pointer will be used such that arrays can be stored (as with Shape and Value or the type of data required can be decided at run-time.