beginBlockComment
public abstract void beginBlockComment(boolean is_doc)
Abstract method to begin a block comment. If the documentation
flag is true, then the block comment is a documentation comment.
The precise form of the block comment for a specific language is
set by the language writer subclass.
endBlockComment
public abstract void endBlockComment(boolean is_doc)
Abstract method to end a block comment. If the documentation flag
is true, then the block comment is a documentation comment. The
precise form of the block comment for a specific language is set
by the language writer subclass.
safeCommentString
public String safeCommentString(String string)
Convert a string into a string that is safe to include inside
a comment. The set of characters that are safe inside a string
is language dependent, so this can be overridden. To motivate
this method, let me just say that having a
*
/
in side a C or Java comment would
prematurely end the comment.
string
- the string to make safe for inclusion inside a
comment.
- a string that can safely be included inside a comment.
writeBanner
public void writeBanner(Symbol symbol,
String file,
boolean is_Impl,
String desc)
Write a file banner for automatically generated files. The banner
is a comment block that provides basic information about the symbol.
writeComment
public void writeComment(String s,
boolean is_doc)
Write a single-line block comment to the pretty writer stream.
If the string is null or contains no characters, then no comment
is written. The documentation flag determines whether this is a
documentation comment.
It is assumed that comment is safe for inclusion in a comment
for any language.
s
- the comment string to include in the outputis_doc
- true
means that the comment should
be treated as a document-style comment in
languages that have such things.
writeComment
public void writeComment(Comment comment,
String alt)
Write a comment with an alternative string. Does nothing if both are null.
comment
- a comment or nullalt
- an alternate string if comment==null, or null itself
writeComment
public void writeComment(Comment comment,
boolean is_doc)
Write a comment for a sidl Comment to the pretty writer stream.
writeComment
public void writeComment(Method method,
boolean is_doc)
Write a comment for a sidl method to the pretty writer stream. If
the symbol does not have a comment associated with it, then only the
method name will be printed to the output stream.
writeComment
public void writeComment(Method method,
boolean is_doc,
boolean add_default)
Write a comment for a sidl method to the pretty writer stream. Optionally
write the method name if the symbol does not have an associated comment.
writeComment
public void writeComment(Symbol symbol,
boolean is_doc)
Write a comment for a sidl symbol to the pretty writer stream. If
the symbol does not have a comment associated with it, then only the
symbol name and version will be printed to the output stream.
writeComment
public void writeComment(Symbol symbol,
boolean is_doc,
boolean output_sym)
Write a comment for a sidl symbol to the pretty writer stream. Optionally
output the symbol name and version first.
writeCommentLine
public abstract void writeCommentLine(String comment)
Abstract method to output a comment to the pretty writer stream.
The comment is not written in a comment block but only on one line
of the output stream. The comment should not contain any new line
characters. If the comment is null, then nothing is output.
It is assumed that comment is safe for inclusion in a comment
for any language.
comment
- a single line comment to include in the output
writeSplicerTagLine
public abstract void writeSplicerTagLine(String tagLine)
Write the splicer tag as a language-specific comment.