home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / as1455n6.zip / XFree86 / doc / AfterStep / src / c++ next >
Text File  |  1998-05-13  |  3KB  |  115 lines

  1. 0. Everybody who writes a class must add the following public method:
  2.  
  3. char *className() const { return "<name>"; }
  4.  
  5. 1. We have to change the directory structure:
  6.  
  7.   afterstep                             stays the same
  8.   modules                               stays the same
  9.   doc                                   stays the same
  10.  
  11.   lib                                   library functions that can
  12.                                         be used by other progs
  13.                                         former location: src/lib
  14.   lib++                                 new:
  15.                                         ...
  16.   include                               all the includes needed bye
  17.                                         the libs
  18.   src                                   the wm
  19.  
  20. 2. Configure script and config.h/os-dependant.h:
  21. They were not very comfortable, so I changed them. I┤m not happy with
  22. them yet, but at least it┤s not getting worse.
  23. There are some things that will not be needed after full move to C++.
  24. E.g. AFTER_INLINE: inline is a feature of standard C++, we don┤t have
  25. to define there anything.
  26.  
  27. 3. C/C++ mixup
  28. I haven┤t yet thought about it. At the moment, all I write is tested
  29. in a simple window. I won┤t think about it before I finished the
  30. asLabel (simple graded label), asCSLabel (compound string graded
  31. label), asMenu and asCMenu (simple and compound menu resp.) classes. I
  32. think, this will take me four to six weeks.
  33.  
  34. 4. Documentation
  35. We should add good description to the classes/functions which can be
  36. extracted by a helper app. E.g. the header files contain the
  37. information (see diffpack by numerical objects, Example:
  38. /*>asError:*/
  39. class asError
  40. {
  41.   friend ostream &<<(....
  42.  public:
  43.   asError();
  44.   asError(Display *dpy);
  45.   ~asError();
  46. ...
  47. }
  48. /*<asError:*/
  49. /*class:asError
  50.  
  51. NAME:   asError - base class for error reporting
  52.  
  53. SYNTAX: @asError
  54.  
  55. KEYWORDS:
  56.  
  57. DESCRIPTION:
  58.  
  59. SEE ALSO:
  60.  
  61. DEVELOPED BY:
  62.  
  63. AUTHOR:
  64.  
  65. End:
  66. */)
  67.  
  68. Here @asError is replaced by that what is parsed between the
  69. statements /*>name*/ and /*<name*/
  70.  
  71. With this, we can produce man/html/ps etc. Another advantage would be
  72. that the manuals are always up to date. Nobody has to write an extra
  73. man-page.
  74.  
  75. My suggestions:
  76.  
  77. /*<class>name*/             starts parsing a class, ends with
  78. /*<end>*/
  79.  
  80. /*<method>[name]            if name is ommitted, it is assumed,
  81. description                 that the previous method definition
  82. */                          gives the name
  83.  
  84. /*<function>[name]          see method, for C-files
  85. description
  86. */
  87.  
  88. /*<manual>name
  89.  
  90.  
  91. <title>...
  92. <author>
  93.  
  94. <syntax>[@classes, @functions]
  95.  
  96. <keywords>...
  97.  
  98. <abstract>
  99.  
  100. <sect>Description
  101.  
  102. <sect>Methods
  103.  
  104. <ref>
  105. (references)
  106. </ref>
  107.  
  108. <dev>
  109. (developed by)
  110. </dev>
  111. */
  112.  
  113.  
  114.                     Juergen.Sawinski@urz.uni-heidelberg.de
  115.