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

Org.SourceFlow.CSharp
Class CSharpEnumeration

IComparable
   |
   +--CodeElement
         |
         +--CodeContainer
               |
               +--CSharpType
                     |
                     +--CSharpEnumeration

   in CSharpEnumeration.cs

public class CSharpEnumeration
extends CSharpType

A class generating a C# enumeration declaration.


Field Summary
 override int Category
          Returns a numeric category number for the code element.
 const int INTERNAL
          The internal access modifier constant.
 const int NEW
          The new modifier constant.
 const int PRIVATE
          The private access modifier constant.
 const int PROTECTED
          The protected access modifier constant.
 const int PROTECTED_INTERNAL
          The protected internal access modifier constant.
 const int PUBLIC
          The public access modifier constant.
   
Fields inherited from class CodeContainer
Count
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
CSharpEnumeration( string name )
          Creates a new enumeration code generator with public access.
CSharpEnumeration( int modifiers, string name )
          Creates a new enumeration code generator with the specified modifiers.
 
Method Summary
 void AddConstant( string name )
          Adds a constant to the enumeration.
 void AddConstant( string name, string value )
          Adds a constant to the enumeration.
 void AddConstant( string name, string value, CSharpComment comment )
          Adds a constant to the enumeration.
 internal bool isLastConstant( Constant c )
          Checks if the specified constant is the last one.
 override void Print( StreamWriter output, CodeStyle style, int indent )
          Prints the code element to the specified output stream.
   
Methods inherited from class CSharpType
ToString, AddComment, Print
   
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

INTERNAL

public const int INTERNAL;
The internal access modifier constant.

NEW

public const int NEW;
The new modifier constant. May only be used when declared inside another type.

PRIVATE

public const int PRIVATE;
The private access modifier constant. May only be used when declared inside another type.

PROTECTED

public const int PROTECTED;
The protected access modifier constant. May only be used when declared inside another type.

PROTECTED_INTERNAL

public const int PROTECTED_INTERNAL;
The protected internal access modifier constant. May only be used when declared inside another type.

PUBLIC

public const int PUBLIC;
The public access modifier constant.


Constructor Detail

CSharpEnumeration

public CSharpEnumeration( string name );
Creates a new enumeration code generator with public access.
Parameters:
name - the enumeration name

CSharpEnumeration

public CSharpEnumeration( int modifiers, string name );
Creates a new enumeration code generator with the specified modifiers.
Parameters:
modifiers - the modifier flag constants
name - the enumeration name


Method Detail

AddConstant

public void AddConstant( string name );
Adds a constant to the enumeration.
Parameters:
name - the constant name

AddConstant

public void AddConstant( string name, string value );
Adds a constant to the enumeration.
Parameters:
name - the constant name
value - the constant value

AddConstant

public void AddConstant( string name, string value, CSharpComment comment );
Adds a constant to the enumeration.
Parameters:
name - the constant name
value - the constant value, or null
comment - the constant comment

isLastConstant

 internal bool isLastConstant( Constant c );
Checks if the specified constant is the last one. This method is used by the constants when printing themselves.
Parameters:
c - the constant to check
Returns:
true if the constant is the last one, or false otherwise

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

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