diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-05 23:30:48 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-05 23:30:48 +0000 |
commit | ab7ecf96a7e17bbeb4c08205fad3b34ef03d7153 (patch) | |
tree | 579ced1b59bfe277d5c705b729eb917bb7ff04f3 /etc | |
parent | b64537275f7a2f65888f3e7def08b39bf87afbdb (diff) | |
download | ATCD-ab7ecf96a7e17bbeb4c08205fad3b34ef03d7153.tar.gz |
Added paragraph delimiters.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/ACE-guidelines.html | 77 |
1 files changed, 53 insertions, 24 deletions
diff --git a/etc/ACE-guidelines.html b/etc/ACE-guidelines.html index 3595d788ae9..942afe1d242 100644 --- a/etc/ACE-guidelines.html +++ b/etc/ACE-guidelines.html @@ -402,105 +402,126 @@ to Graham for providing the OSE tools!<p> libraries.</strong> <i>I.e.</i>, use Double Check Locking. <dd>This is a well known problem among OO C++ class designers. See <em>Designing and Coding Reusable C++</em> by Caroll and Ellis, - for example. + for example.<p> <dt>If you are parameterizing a searchable container template class with readers/writer locks, do not use sentinels or any state that requires updating during a a search. - <dd>... + <dd>....<p> - <dt>In multi-threaded objects, all methods should be re-entrant. + <dt>In multi-threaded objects, all methods should be re-entrant..<p> <dt>Framework users should always use wrappers instead of directly making system calls. - <dd>... + <dd>....<p> - <dt>Always guard against multiple inclusion of header files. + <dt>Always guard against multiple inclusion of header files..<p> <dt>Templates may require source. Hence, source files may need to be guarded against multiple inclusion too. - <dt>Template classes should not be mixed with non-template classes. + <dt>Template classes should not be mixed with non-template classes..<p> <dt>Guard against quirky compiler implementations through #define - abstractions (whereever possible). + abstractions (whereever possible)..<p> - <dt>Use consistent error-handling. + <dt>Use consistent error-handling..<p> <dt>Abstract away different representations of handles / file - descriptors. + descriptors..<p> - <dt>Avoid the use of global functions. + <dt>Avoid the use of global functions..<p> <dt>If functions are required, place them within a namespace or - nested in a class. + nested in a class..<p> - <dt>Avoid polluting the namespace. + <dt>Avoid polluting the namespace..<p> - <dt>Don't use the inline keyword directly. + <dt>Don't use the inline keyword directly..<p> <dt>Separate inline code into their own implementation files. - <i>I.e.</i> do not write code in header files. + <i>I.e.</i> do not write code in header files..<p> <dt>(Internationalization) Do not use the char type directly. Abstract it for wide characters. Thus, do not assume your - character abstraction is a single byte. + character abstraction is a single byte..<p> <dt>Don't use conditional compilation based on compiler/OS/hardware - platform, but upon available features. + platform, but upon available features..<p> <dt>Centralize portability #ifdefs in a single place to ease - portability maintainence. + portability maintainence..<p> <dt>Either check or return all return values (from framework - calls). + calls)..<p> <dt>Apply strategy pattern to factor out common sources of variation - in a component. + in a component..<p> - <dt>Use traits to merge multiple template arguments. + <dt>Use traits to merge multiple template arguments..<p> - <dt>Allow customization of memory allocation. + <dt>Allow customization of memory allocation.<p> - <dt>Instrument framework methods to allow for run-time tracing. + <dt>Instrument framework methods to allow for run-time tracing.<p> - <dt>Avoid long chains of dereference operators. + <dt>Avoid long chains of dereference operators.<p> <dt>Use open() methods rather than constructors. + <p> <dt>Instrument a dump() method in every object. + <p> + <dt>Qualify references to base class methods and data. <i>I.e.</i>, anything outside the scope of the class. + <p> + <dt>Guard against multiple open() and close() calls, for idempotency. + <p> + <dt>The state of an object does not need to be guarded in destructors. + <p> + <dt>Base classes should not store information about derived classes. + <p> + <dt>Don't make static objects whose correctness depends on constructors being called. (That is, if 0 initialization is not sufficient.) + <p> + <dt>Guarantee singleton destruction. <i>E.g.</i>, provide hooks that allow singletons to be deleted before the process exits. + <p> + <dt>All uses of the placement new operator must be accompanied by a corresponding explicit destructor call. + <p> + <dt>In classes that require locking, have public methods acquire the locks and call protected/private methods that do not acquire the locks. + <p> + <dt>Try to minimize the number of template parameters passed to a base class. Try to have a base class that is not a template, from which specialized classes can be derived that may have template parameters. + <p> + <dt>Define wrappers around clusters of functionality that are semantically the same but may have accidental incompatibilities. <i>E.g.</i>, semaphores, readers/writer @@ -508,15 +529,23 @@ to Graham for providing the OSE tools!<p> threads, processes, that may or may not reside on the same machine. + <p> + <dt>Define generic components that can be parameterized by the wrappers defined above (in the previous point). + <p> + <dt>Separate creation from use. <i>E.g.</i>, acceptor/connector and service handler. + <p> + <dt>In searchable containers, separate traversal logic from item operations. + <p> + <dt>... </dl><p> @@ -529,7 +558,7 @@ to Graham for providing the OSE tools!<p> <hr> <!-- hhmts start --> -Last modified: Fri Dec 5 17:25:30 CST 1997 +Last modified: Fri Dec 5 17:29:17 CST 1997 <!-- hhmts end --> </body> |