To create an organization attribute class header file:
|
|
|
1.
|
Name the attribute organization class
ATTRIB_<sentinel> where
<sentinel> is a unique two- or three-letter code obtained from
Spatial's customer support department. In this example, the sentinel "ABC" is used.
|
|
|
2.
|
Copy the
at_tsl.hxx file (the header file for the
ATTRIB_TSL class) from the
ACIS installation directory and rename it
at_abc.hxx.
|
|
|
3.
|
Change the copied file as shown in the following example. Replace all the bold names in the file (tsl or
TSL) with the new organization class's sentinel. In this example, the sentinel "ABC" (shown in bold italics as
abc or
ABC) is used.
|
|
Note
|
In this example, the organization attribute class is defined in the KERN module (where ATTRIB_TSL is defined. To define a class in a different module, additional changes to the file would be needed.
|
|
Example 3-1 of the attribute header file shows the sentinels that are to be replaced in
bold font. In the new file, the new sentinel is shown inbold italic font.
|
|
C++ Example
|
|
// Attribute declaration for a private container attribute. Each
|
// application developer receives one of these customized for
|
// their use.
|
// All attributes specific to the application developer are then
|
// made derived classes of this attribute, ensuring that
|
// different developers can assign identifiers independently
|
// without mutual interference.
|
|
#if !defined(ATTRIB_TSL_CLASS)
|
#define ATTRIB_TSL_CLASS
|
|
#include "kernel/dcl_kern.h"
|
#include "kernel/kerndata/attrib/attrib.hxx"
|
|
extern DECL_KERN int ATTRIB_TSL_TYPE;
|
#define ATTRIB_TSL_LEVEL (ATTRIB_LEVEL + 1)
|
|
MASTER_ATTRIB_DECL( ATTRIB_TSL, KERN )
|
#endif
|
|
Example 3-1. Original at_tsl.hxx
|
|
After customizing
at_tsl.hxx into
at_abc.hxx, the organization class file should appear similar to Example 3-2.
|
|
C++ Example
|
|
#if !defined(ATTRIB_ABC_CLASS)
|
#define ATTRIB_ABC_CLASS
|
|
#include "kernel/dcl_kern.h"
|
#include "kernel/kerndata/attrib/attrib.hxx"
|
|
extern int ATTRIB_ABC_TYPE;
|
#define ATTRIB_ABC_LEVEL (ATTRIB_LEVEL + 1)
|
|
MASTER_ATTRIB_DECL( ATTRIB_ABC, KERN )
|
#endif
|
|
Example 3-2. Customized at_abc.hxx
|
|
Macro
MASTER_ATTR_DECL completes the file. The first argument is the new organization attribute class name; the second is the module name.
|