At the source code level, the OBS Framework consists of two types of items:
- C++ Classes that implement the concrete components and the abstract interfaces of the framework.
- XSLT Programs that implement the generator meta-components and the transformer meta-components of the framework.
Cpp Code Organization
The C++ code is organized as a single directory (src/cpp/
) subdivided into a
set of subdirectories that gather together groups of logically related classes. Each
class is implemented in up to four files representing: the class declaration, the class
implementation, the class inline implementation, and the class #include
declarations. If the name of the class is <className>, then the
declaration file is called: <className>.h
, the implementation
file is called <className>.cpp
, the inline file is called:
<className>_inl.h
, and the include file is called: <className>_inc.h
.
Note that the test case classes
and the regression test to run them are integrated with the framework code and are
stored in the RegressionTest
subdirectory.
Cpp Code Documentation
At architectural design level, the C++ code is documented by a UML model. At detailed design level, the documentation of the C++ code is contained in the code itself in the form of comments that follow the JavaDoc conventions. The information in these comments is extracted from the code and formatted by the Doxygen facility. The Doxygen-generated detailed description of the OBS Framework code can be entered by following this link.
Doxygen can also generate XML, Latex and RTF versions of the code documentation. These are however not included in this web site. They can be generated by editing the Doxygen configuration file and re-running Doxygen.
XSL Code Organization
The XSL code is organized in two directories:
-
src/xsl
that contains the generator meta-components -
src/AspectX
that contains the transformer meta-components
A generator meta-component is implemented in a small number of XSL files. If the name of the meta-component is <meta>, then the following XSL files may be provided:
-
<meta>Header
: generate the header file of the generate class. This file is always present. -
<meta>Body
: generate the body file of the generate class. This file is always present. -
<meta>Include
: generate an include file that defines application-specific constants that are associated to the generated class. This file is only present if needed. -
<meta>TestCaseHeader
: generate the header file of the test case associated to the generated class. This file is only present if a test case for is generated as well as a framework class. -
<meta>TestCaseBody
: generate the body file of the test case associated to the generated class. This file is only present if a test case for is generated as well as a framework class.
An Ant build file runGeneratorMetaComponent is provided to run the meta-components. This build file can also generate some sample components that are included in the code delivery of the OBS Framework as an illustration of the usage of the generator meta-components.
XSL Code Documentation
There are no well-established ways of documenting XSL code. High-level views of the generator meta-components provided by the OBS Framework can be found here: