| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
The code units in a source file will be called ``language elements''. This includes for example a class definition, a function definition, a definition of one or more variables, a class declaration, a function declaration, etc. Basically, a language element is any complete statement in the grammar for the language. These are the pieces of the language which can have comment elements associated with them. Likewise, the comment elements are the comments which must precede the language element with which they are associated. So, for example, the following code fragment shows a function definition along with its associated comment.
// <div>
// <p> This function computes the area of a triangle and returns the
// result.
// </div>
float triangle::area() \{
return (0.5 * base() * height());
\};
In this example, the code element is the definition of the function
triangle::area(). The comment element preceding the definition
is associated with the function. This pair will be converted into one
piece of the documentation generated by the documentation extractor.
While comment elements can be provided for any C++ language elements or preprocessor elements, all comments will not be extracted. Initially, comments will only be extracted for functions and classes. Later elements like ``#define''s, structs, enums, etc. will be added.