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. |
|
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. |
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
CodeFile
public CodeFile( DirectoryInfo dir );
-
Creates a new code file.
- Parameters:
dir - the base directory
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