home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / ctg.lha / ctg / doc / ctg.man < prev    next >
Encoding:
Text File  |  1995-02-28  |  7.4 KB  |  265 lines

  1.  
  2.  
  3.  
  4. CTG(1)                   USER COMMANDS                     CTG(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      ctg - generate pretty class trees from C++ source files
  10.  
  11. SYNOPSIS
  12.      ctg [ -m ] [ -o _n_a_m_e ] [ -p ] [ -r _n_a_m_e ] [ -s ] [ -S _n_a_m_e ]
  13.      [ -v ] name ...
  14.  
  15. DESCRIPTION
  16.      ctg reads a number of C++ source files, extracts  class  und
  17.      struct  definitions and generates a graphical representation
  18.      of the resulting class hierarchy as a PostScript source. The
  19.      output  may  be constrained to a subset of classes according
  20.      to the contents of a given configuration file.
  21.  
  22. OPTIONS
  23.      If run  without  options,  ctg  processes  all  input  files
  24.      silently and writes the generated class tree to the standard
  25.      output.
  26.  
  27.      -m        Micro size output. By default ctg uses 80x12 boxes
  28.                and  font  size 10 for the PostScript output which
  29.                suffices for trees with depth 6. With this  option
  30.                60x10  boxes  and font size 8 are used. This might
  31.                suffice for larger class libraries.
  32.  
  33.      -o _n_a_m_e   Output file specification. By default  ctg  writes
  34.                the  PostScript  source to the standard. With this
  35.                option the output is written to _n_a_m_e.
  36.  
  37.      -p        Also include  privates.  By  default  ctg  ignores
  38.                _p_r_i_v_a_t_e  sections  within  class definitions. With
  39.                this option also private classes are included into
  40.                the hierarchy.
  41.  
  42.      -r _n_a_m_e   Root  class  specification.  Only  descendants  of
  43.                class  _n_a_m_e  are  included  into  the output. This
  44.                option overrides any root specification in a given
  45.                configuration   file.   Without  this  option  all
  46.                classes are sons of the overall root *.
  47.  
  48.      -s        Also  include  structs.  By  default  ctg  ignores
  49.                struct  definitions. With this option also structs
  50.                are included into the hierarchy.
  51.  
  52.      -S _n_a_m_e   Configuration file specification. By  default  ctg
  53.                tries  to  read  the  configuration from ~./ctgrc.
  54.                This options causes ctg to read it from  the  file
  55.                _n_a_m_e.
  56.  
  57.      -v        Verbose option. By default ctg processes the input
  58.                files  silently.  With  this  option ctg generates
  59.                messages about all actions and writes them to  the
  60.  
  61.  
  62.  
  63. COMMANDS          Last change: 25 February 1995                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CTG(1)                   USER COMMANDS                     CTG(1)
  71.  
  72.  
  73.  
  74.                standard  output.  If no output file specification
  75.                is given, the PostScript source is written to  the
  76.                file _o_u_t._p_s.
  77.  
  78. FILES
  79.      If the -S option has been omitted, ctg  tries  to  read  the
  80.      configuration  from  ~/.ctgrc.  Note that the argument to -r
  81.      overrides a given root specification  in  the  configuration
  82.      file.
  83.  
  84.      A configuration for ctg consists of a number  of  specifica-
  85.      tion statements which affect the preprocessing stage and the
  86.      PostScript code generation.
  87.  
  88.        Config = { Stmt }.
  89.        Stmt   = "preprocess" string
  90.               | "exclude" file_identifier { file_identifier }
  91.               | "root" Node
  92.               | "collapse" class_identifier { class_identifier }.
  93.        Node   = (class_identifier | "*")
  94.                 [ "(" Node { "," Node } ")" ].
  95.  
  96.      preprocess _s_t_r_i_n_g
  97.  
  98.      In order to enable accurate parsing all sources are  prepro-
  99.      cessed before they are passed on ctg's parser. The statement
  100.      specifies a command template used for the invocation  of  an
  101.      external  preprocessor. The template _s_t_r_i_n_g must contain two
  102.      %s fill-ins where  at  each  invocation  the  first  one  is
  103.      replaced  by  the source file name and the second one by the
  104.      preprocessor output file (extension .i  required).  Example:
  105.      _p_r_e_p_r_o_c_e_s_s "_g_c_c -_E %_s >%_s".
  106.  
  107.      exclude _f_i_l_e__i_d_e_n_t_i_f_i_e_r { _f_i_l_e__i_d_e_n_t_i_f_i_e_r }
  108.  
  109.      This statement specifies a number of header files which will
  110.      be  excluded  from  the final preprocessor output. Typically
  111.      this list consists  of  C  and  C++  standard  headers.  The
  112.      _i_o_s_t_r_e_a_m._h  header should always be specified, since it con-
  113.      tains classes with multiple inheritance (see diagnostics).
  114.  
  115.      root _N_o_d_e
  116.  
  117.      The root of the generated class hierarchy is specified  with
  118.      this statement.  Optionally _c_l_a_s_s__i_d_e_n_t_i_f_i_e_r may be followed
  119.      by a list of (direct) son nodes  enclosed  in  brackets.  In
  120.      such  a  case  only these sons are included into the output,
  121.      all other sons do not appear. Each son node may in turn con-
  122.      sist of a _c_l_a_s_s__i_d_e_n_t_i_f_i_e_r and a list of son nodes. The spe-
  123.      cial class node "*" is regarded as the father of  all  class
  124.      and struct definitions.
  125.  
  126.  
  127.  
  128.  
  129. COMMANDS          Last change: 25 February 1995                 2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CTG(1)                   USER COMMANDS                     CTG(1)
  137.  
  138.  
  139.  
  140.      collapse _c_l_a_s_s__i_d_e_n_t_i_f_i_e_r { _c_l_a_s_s__i_d_e_n_t_i_f_i_e_r }
  141.  
  142.      This statement specifies a number of class nodes whose  sons
  143.      will not be included in the generated class tree.
  144.  
  145. EXAMPLE
  146.      $ cat my_ctgrc
  147.      preprocess "gcc -E -I/home/gup/rk/misc/include %s >%s"
  148.      exclude
  149.        iostream.h iomanip.h fstream.h
  150.        assert.h ctype.h errno.h float.h limits.h locale.h math.h
  151.        setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h
  152.        string.h time.h
  153.        sys/types.h sys/param.h sys/time.h unistd.h pwd.h
  154.      root * (Preprocessor,
  155.              TObject (FuzzyParser, ClassTree, Scanner)
  156.             )
  157.      $ ctg -o ctg.ps -S my_ctgrc *.cc
  158.  
  159. DIAGNOSTICS
  160.      Error messages generated by  the  semantic  actions  of  the
  161.      fuzzy parser:
  162.  
  163.      _d_u_p_l_i_c_a_t_e _c_l_a_s_s _d_e_f_i_n_i_t_i_o_n
  164.          two class definitions with the same identifier
  165.  
  166.      _u_n_d_e_f_i_n_e_d _b_a_s_e _c_l_a_s_s
  167.          definition of a derived class  where  the  anchestor  is
  168.          unknown
  169.  
  170.      _m_u_l_t_i_p_l_e _i_n_h_e_r_i_t_a_n_c_e _n_o_t _s_u_p_p_o_r_t_e_d
  171.          class definition with more than one base class (reported
  172.          for iostream.h classes)
  173.  
  174.      Error messages generated by the PostScript code generator:
  175.  
  176.      _t_r_e_e _w_i_d_t_h _e_x_c_e_e_d_s _n
  177.          tree width exceeds paper size
  178.  
  179.      _t_r_e_e _h_e_i_g_h_t _e_x_c_e_e_d_s _n
  180.          tree height exceeds paper size
  181.  
  182.      Fatal errors that should not occur under normal conditions:
  183.  
  184.      file _f_i_l_e, line _l_i_n_e: unhandled exception: _c_o_d_e - exiting
  185.  
  186.      _c_o_d_e = -_2           out of memory
  187.  
  188.      _c_o_d_e = -_2_0_0         scanner could not open source file
  189.  
  190.      _c_o_d_e = -_2_0_1         hash table error
  191.  
  192.  
  193.  
  194.  
  195. COMMANDS          Last change: 25 February 1995                 3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CTG(1)                   USER COMMANDS                     CTG(1)
  203.  
  204.  
  205.  
  206. BUGS
  207.      ctg does not support  multiple  inheritance,  so  only  _t_r_u_e
  208.      trees are generated.
  209.  
  210. AUTHOR
  211.      Rainer Koppler (rk@gup.uni-linz.ac.at), v1.0, 21/02/95
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. COMMANDS          Last change: 25 February 1995                 4
  262.  
  263.  
  264.  
  265.