Org.SourceFlow.C
Class CFile
IComparable
|
+--CodeElement
|
+--CodeContainer
|
+--CodeFile
|
+--CFile
in CFile.cs
- public class CFile
- extends CodeFile
A class generating a C code file.
|
Field Summary |
override int |
Category
Returns a numeric category number for the code element. |
override string |
Name
Returns the file name. |
|
Constructor Summary |
CFile( DirectoryInfo dir, string name, bool header )
Creates a new C code file in the specified base directory. |
Category
public override int Category;
- Returns a numeric category number for the code element. A
lower category number implies that the code element should
be placed before code elements with a higher category
number within a declaration.
- Returns:
- the category number
Name
public override string Name;
- Returns the file name.
- Returns:
- the file name
CFile
public CFile( DirectoryInfo dir, string name, bool header );
- Creates a new C code file in the specified base directory.
- Parameters:
dir - the output directory
name - the base file name (no extension)
header - the header file flag
AddComment
public void AddComment( CComment comment );
- Adds a comment to this file.
- Parameters:
comment - the new file comment
AddFunction
public void AddFunction( CFunction function );
- Adds a function to the file.
- Parameters:
function - the function to add
AddInclude
public void AddInclude( CInclude include );
- Adds an include to the file.
- Parameters:
include - the include to add
AddTypedef
public void AddTypedef( CTypedef typedef );
- Adds a typedef declaration to the file.
- Parameters:
typedef - the typedef to add
AddVariable
public void AddVariable( CVariable variable );
- Adds a variable to the file.
- Parameters:
variable - the variable to add
Print
public override void Print( StreamWriter output, CodeStyle style, int indent );
- Prints the file contents to the specified output stream.
- Parameters:
output - the output stream
style - the code style to use
indent - the indentation level