next up previous contents
Next: Packages, Versions, and Import Up: SIDL Files Previous: SIDL Files   Contents

Comments and Doc-Comments

SIDL has the same commenting style as C++/Java and even has a special documentation comment (so called doc-comment) similar to those used in Javadoc. One can embed comments anywhere in their SIDL file. Documentation comments should immediately preceed the class, interface, or method with which they are associated. Babel replicates documentation comments in the files it generates.

users_guide/basics/code/comment_example.sidl

Consider the above SIDL file fragment.

  1. This comment is a regular multi-line comment that is delimited by a slash-star , star-slash (``/*'', ``*/'') pair.
  2. This is a single-line comment that starts with a double slash ``//'' and continues to the end of the line.
  3. This comment is the same as # 1 except that it is completely contained on a single line. It can be embedded in the middle of a line anywhere a space naturally occurs.
  4. This is a documentation comment. In keeping with Javadoc, Doc++, and other tools, it is delimited by slash-star-star and star-slash (``/**'', ``*/'') combinations. Documentation comments are important because their contents are preserved by Babel in the corresponding generated files. Doc-comments must directly precede the interface, class, or method that they document.
  5. This is a multi-line variant of a doc-comment. Note that initial asterisks on a line are assumed to be for human readers only and are discarded by Babel when it reads in the text. The multi-line doc-comment is the preferred way of documenting SIDL.


next up previous contents
Next: Packages, Versions, and Import Up: SIDL Files Previous: SIDL Files   Contents


babel-0.8.0
users_guide Last Modified 2003-01-14

http://www.llnl.gov/CASC/components
components@llnl.gov