classes  -  unique identifiers for catalog-managed objects
       and component views


SYNOPSIS

       #include <Unidraw/classes.h>


DESCRIPTION

       Classes for catalog-managed objects, including components,
       commands,  tools, state variables, and transfer functions,
       must be associated with mutually-unique class  identifiers
       that  can  be  written  onto  disk.  This allows a creator
       object to call the  appropriate  constructor  as  part  of
       recreating an object from disk.

       Also,  there must be a mechanism for creating an appropri-
       ate view given a subject; that is, there must be an  asso-
       ciation between a subject class and allowable view classes
       for that subject.   This  association  is  established  by
       defining  class  identifiers  for  component views.  These
       identifiers are formed by concatenating the identifier for
       a  given  component  subject class with an identifier that
       specifies a ``view category.''   For  example,  the  class
       identifier for the PostScript external view of a line com-
       ponent is the concatenation of the identifier for the line
       component  subject  class  and POSTSCRIPT_VIEW identifier,
       which specifies the category of external views for  gener-
       ating  PostScript.   This  makes  it possible to create an
       instance of the appropriate PostScript external view  sub-
       class given a line component subject.

       The  class identifiers for the Unidraw base and predefined
       derived classes are specified  in  the  classes.h  include
       file.    Applications   that  define  new  catalog-managed
       objects or component  views  should  define  unique  class
       identifiers  in  a  similar manner.  Class identifiers for
       catalog-managed objects are simply integers with  mnemonic
       macro  definitions,  usually  the class name in all-upper-
       case.  For example, the identifier for the LineComp compo-
       nent subject class is

       #define LINE_COMP 9030

       View  class  identifiers  are  specified using the Combine
       macro, which takes as its first argument the macro defini-
       tion  of  the  corresponding component subject identifier;
       its second argument is an identifier for  the  view  cate-
       gory.   The  Combine  macro  itself is then defined with a
       mnemonic  name.   For  example,  the  identifier  for  the
       PostScript  external  view  class  PSLine (which generates
       PostScript for the line component subject) is defined as

       #define PS_LINE Combine(LINE_COMP, POSTSCRIPT_VIEW)
       defined as

       #define POSTSCRIPT_VIEW 9103

       N.B.: All class identifiers in a given application must be
       unique.


SEE ALSO

       Catalog(3U), Creator(3U)












































Man(1) output converted with man2html