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

Org.SourceFlow.CSharp
Class CSharpVariable

IComparable
   |
   +--CodeElement
         |
         +--CSharpVariable

   in CSharpVariable.cs

public class CSharpVariable
extends CodeElement

A class generating a C# variable declaration. The variable declaration should be placed as a member in a class.


Field Summary
 override int Category
          Returns a numeric category number for the code element.
 const int CONST
          The const modifier constant.
 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.
 const int READONLY
          The readonly modifier constant.
 const int STATIC
          The static modifier constant.
 const int VOLATILE
          The volatile modifier constant.
   
Fields inherited from class CodeElement
Category
 
Constructor Summary
CSharpVariable( string type, string name )
          Creates a new variable with the specified type and name.
CSharpVariable( int modifiers, string type, string name )
          Creates a new variable with the specified modifiers, type and name.
CSharpVariable( string type, string name, string initValue )
          Creates a new variable with the specified type, name and initializer.
CSharpVariable( int modifiers, string type, string name, string initValue )
          Creates a new variable with the specified modifiers, type, name and initializer.
 
Method Summary
 void AddArrayInit( string elementValue )
          Adds initialization code for an array element value.
 void AddComment( CSharpComment comment )
          Adds a comment to this variable.
 override void Print( StreamWriter output, CodeStyle style, int indent )
          Prints the code element to the specified output stream.
 override string ToString()
          Returns the variable 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

CONST

public const int CONST;
The const modifier constant. Cannot be combined with static, readonly or volatile.

INTERNAL

public const int INTERNAL;
The internal access modifier constant.

NEW

public const int NEW;
The new modifier constant. Cannot be combined with override.

PRIVATE

public const int PRIVATE;
The private access modifier constant.

PROTECTED

public const int PROTECTED;
The protected access modifier constant.

PROTECTED_INTERNAL

public const int PROTECTED_INTERNAL;
The protected internal access modifier constant.

PUBLIC

public const int PUBLIC;
The public access modifier constant.

READONLY

public const int READONLY;
The readonly modifier constant. Cannot be combined with const or volatile.

STATIC

public const int STATIC;
The static modifier constant. Cannot be combined with const.

VOLATILE

public const int VOLATILE;
The volatile modifier constant. Cannot be combined with const or readonly.


Constructor Detail

CSharpVariable

public CSharpVariable( string type, string name );
Creates a new variable with the specified type and name.
Parameters:
type - the variable type
name - the variable name

CSharpVariable

public CSharpVariable( int modifiers, string type, string name );
Creates a new variable with the specified modifiers, type and name.
Parameters:
modifiers - the modifier flags to use
type - the variable type
name - the variable name

CSharpVariable

public CSharpVariable( string type, string name, string initValue );
Creates a new variable with the specified type, name and initializer.
Parameters:
type - the variable type
name - the variable name
initValue - the initialize value

CSharpVariable

public CSharpVariable( int modifiers, string type, string name, string initValue );
Creates a new variable with the specified modifiers, type, name and initializer.
Parameters:
modifiers - the modifier flags to use
type - the variable type
name - the variable name
initValue - the initialize value


Method Detail

AddArrayInit

public void AddArrayInit( string elementValue );
Adds initialization code for an array element value. Each array element value added will be added last in the list of initialization values. If an init value has been specified with the constructor, it will be added first.
Parameters:
elementValue - the array element value

AddComment

public void AddComment( CSharpComment comment );
Adds a comment to this variable.
Parameters:
comment - the comment to add

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 variable name.
Returns:
the variable name

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