All home-made classes are located in namespace cmd2m.
Header files have suffix ".h", implementation files have suffix
".cpp".
Guards of header files are named as "_FileName_H".
Naming scheme
Class and method names are started with capital letters.
All home-made classes are started with prefix Cmd, e.g.
CmdBgoCluster
Class methods, which returns or set private fields (so-called
getters/setters) are named with prefix Get/Set
correspondingly, e.g. CmdDateTime::GetYear() or
CmdDateTime::SetYear(const int).
Exceptions
All exceptions are inherited from basic CMD-2M exception class
Exceptions are organized in tree-like structure: there is basic
class for each package, then basic class for each sub-package (if
any), and so forth. Each class, which throws exceptions, has its
own exception class, which is inherited from basic class of
sub-package, which in turn is inherited from basic class of
package, which in turn is inherited from basic CMD-2M exception
class.
Suffix "_Exception" is added to the name of exception classes,
e.g. CmdDateTime_Exception.
If exception is used (thrown) only by a particular class, it is
defined in the header file of corresponding class. The exception
definition preceeds main class definition.
If exception (one or several) are shared by several classes
inside the package, they are defined in a separate header file.
Package organization and makefiles
Packages are organized in tree-like structure:
$CVSROOT/package/subpackage/subsubpackage/...
On the lowest level there is following directory structure :
/src
Source files
/inc
Header files
/adoc
Documentation, written by author (not
generated automatically)