|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.sourceflow.CodeElement
org.sourceflow.CodeContainer
org.sourceflow.CodeFile
org.sourceflow.c.CFile
A class generating a C code file.
| Constructor Summary | |
CFile(java.io.File dir,
java.lang.String name,
boolean header)
Creates a new C code file in the specified base directory. |
|
| Method Summary | |
void |
addComment(CComment comment)
Adds a comment to this file. |
void |
addFunction(CFunction function)
Adds a function to the file. |
void |
addInclude(CInclude include)
Adds an include to the file. |
void |
addTypedef(CTypedef typedef)
Adds a typedef declaration to the file. |
void |
addVariable(CVariable variable)
Adds a variable to the file. |
int |
category()
Returns a numeric category number for the code element. |
java.lang.String |
getName()
Returns the file name. |
void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent)
Prints the file contents to the specified output stream. |
| Methods inherited from class org.sourceflow.CodeFile |
getFile, toString, write |
| Methods inherited from class org.sourceflow.CodeContainer |
addElement, printContents, size |
| Methods inherited from class org.sourceflow.CodeElement |
compareTo, printSeparator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CFile(java.io.File dir,
java.lang.String name,
boolean header)
dir - the output directoryname - the base file name (no extension)header - the header file flag| Method Detail |
public java.lang.String getName()
getName in class CodeFilepublic void addComment(CComment comment)
comment - the new file commentpublic void addInclude(CInclude include)
include - the include to addpublic void addTypedef(CTypedef typedef)
typedef - the typedef to addpublic void addVariable(CVariable variable)
variable - the variable to addpublic void addFunction(CFunction function)
function - the function to addpublic int category()
category in class CodeElement
public void print(java.io.PrintWriter out,
CodeStyle style,
int indent)
print in class CodeElementout - the output streamstyle - the code style to useindent - the indentation level
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||