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

Org.SourceFlow.C
Class CFunction

IComparable
   |
   +--CodeElement
         |
         +--CFunction

   in CFunction.cs

public class CFunction
extends CodeElement

A class generating a C function declaration.


Field Summary
 override int Category
          Returns a numeric category number for the code element.
 bool PrintCode
          The print method source code property.
 const int STATIC
          The static modifier constant.
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
CFunction( string name )
          Creates a new function with the specified name.
CFunction( string name, string args )
          Creates a new function with the specified name and arguments.
CFunction( string name, string args, string returnType )
          Creates a new function with the specified name, arguments and return type.
CFunction( int modifiers, string name, string args, string returnType )
          Creates a new function with the specified arguments.
 
Method Summary
 void AddCode( string codeLines )
          Adds one or more lines of actual code.
 void AddComment( CComment comment )
          Sets a comment for this function.
 override void Print( StreamWriter output, CodeStyle style, int indent )
          Prints the code element to the specified output stream.
 override string ToString()
          Returns the function name.
   
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

PrintCode

public bool PrintCode;
The print method source code property.

STATIC

public const int STATIC;
The static modifier constant.


Constructor Detail

CFunction

public CFunction( string name );
Creates a new function with the specified name. The function will not take any arguments and will return void.
Parameters:
name - the function name

CFunction

public CFunction( string name, string args );
Creates a new function with the specified name and arguments. The function will return void.
Parameters:
name - the function name
args - the argument list, excluding parenthesis

CFunction

public CFunction( string name, string args, string returnType );
Creates a new function with the specified name, arguments and return type.
Parameters:
name - the function name
args - the argument list, excluding parenthesis
returnType - the return type

CFunction

public CFunction( int modifiers, string name, string args, string returnType );
Creates a new function with the specified arguments.
Parameters:
modifiers - the modifier flags to use (or zero)
name - the function name
args - the argument list, excluding parenthesis
returnType - the return type


Method Detail

AddCode

public void AddCode( string codeLines );
Adds one or more lines of actual code.
Parameters:
codeLines - the lines of C code to add

AddComment

public void AddComment( CComment comment );
Sets a comment for this function.
Parameters:
comment - the new function comment

Print

public override void Print( StreamWriter output, CodeStyle style, int indent );
Prints the code element to the specified output stream.
Parameters:
output - the output stream
style - the code style to use
indent - the indentation level

ToString

public override string ToString();
Returns the function name.
Returns:
the function name

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