Overview   Project   Class   Tree   Deprecated   Index 
SourceFlow 1.0.beta API Documentation
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

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.
   
Fields inherited from class CodeFile
File, Name
   
Fields inherited from class CodeContainer
Count
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
CFile( DirectoryInfo dir, string name, bool 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.
 override void Print( StreamWriter output, CodeStyle style, int indent )
          Prints the file contents to the specified output stream.
   
Methods inherited from class CodeFile
ToString, Write
   
Methods inherited from class CodeContainer
AddElement, PrintContents
   
Methods inherited from class CodeElement
CompareTo, Print, PrintSeparator
 

Field Detail

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


Constructor Detail

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


Method Detail

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

 Overview   Project   Class   Tree   Deprecated   Index 
SourceFlow 1.0.beta API Documentation
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD