Org.SourceFlow.CSharp
Class Constant
IComparable
|
+--CodeElement
|
+--Constant
in CSharpEnumeration.cs
- internal class Constant
- extends CodeElement
A class generating a C# enumeration constant declaration.
|
Field Summary |
override int |
Category
Returns a numeric category number for the code element. |
CSharpComment |
Comment
Sets the constant comment. |
|
Method Summary |
override void |
Print( StreamWriter output, CodeStyle style, int indent )
Prints the code element to the specified output stream. |
protected internal override void |
PrintSeparator( StreamWriter output, CodeElement prev )
Prints a separator line between this element and the
previous element in a container. |
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
Comment
public CSharpComment Comment;
-
Sets the constant comment. This method overwrites any
previous comment.
- Parameters:
comment - the new constant comment
Constant
public Constant( CSharpEnumeration parent, string name, string value );
-
Creates a new constant.
- Parameters:
name - the constant name
value - the constant value
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
PrintSeparator
protected internal override void PrintSeparator( StreamWriter output, CodeElement prev );
-
Prints a separator line between this element and the
previous element in a container. This method will NOT
be called for the first element in a container, as it
has no previous element. This method prints a single
newline only if it has a comment.
- Parameters:
output - the output stream
prev - the previous code element