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

Org.SourceFlow
Class CodeFile

IComparable
   |
   +--CodeElement
         |
         +--CodeContainer
               |
               +--CodeFile

   in CodeFile.cs
Direct Known Subclasses:
CFile, CSharpFile, JavaFile, VisualBasicFile

public abstract class CodeFile
extends CodeContainer

The abstract base class for all code files. The code files are also code element containers.


Field Summary
 FileInfo File
          Returns the file object to be generated.
 abstract string Name
          Returns the file name without the directory path.
   
Fields inherited from class CodeContainer
Count
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
CodeFile( DirectoryInfo dir )
          Creates a new code file.
 
Method Summary
 override string ToString()
          Returns the complete file path, including the directory.
 void Write( CodeStyle style )
          Writes the source code for this file.
   
Methods inherited from class CodeContainer
AddElement, PrintContents
   
Methods inherited from class CodeElement
CompareTo, Print, PrintSeparator
 

Field Detail

File

public FileInfo File;
Returns the file object to be generated.
Returns:
the file object to be generated

Name

public abstract string Name;
Returns the file name without the directory path.
Returns:
the file name


Constructor Detail

CodeFile

public CodeFile( DirectoryInfo dir );
Creates a new code file.
Parameters:
dir - the base directory


Method Detail

ToString

public override string ToString();
Returns the complete file path, including the directory.
Returns:
the complete file path

Write

public void Write( CodeStyle style );
Writes the source code for this file. Any previous file with this name will be overwritten.
Parameters:
style - the code style to use
Throws:
IOException - if the file could not be written properly

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