|
SourceFlow 1.0.beta API Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
System.Object
|
+--CodeStyle
in CodeStyle.csThe base class for all code styles. The code style classes allows configuring some aspects of the source code generated. The code style classes also contain helper methods for the code generators. To create new code styles, this class should be subclassed.
| Field Summary | |
static readonly CodeStyle |
C
The default C code style. |
static readonly CodeStyle |
CSHARP
The default C# code style. |
static readonly CodeStyle |
JAVA
The default Java code style. |
virtual int |
Margin
Returns the right print margin. |
static readonly CodeStyle |
VISUAL_BASIC
The default Visual Basic code style. |
| Constructor Summary | |
CodeStyle( int margin, string indent )
Creates a new code style. |
|
| Method Summary | |
virtual string |
AddStringEscapes( string str, char escape )
Adds escapes in front of all " characters in a string. Any occurence of the escape character itself will also be escaped. |
virtual string |
GetIndent( int level )
Returns the indentation string for the specified level. |
virtual string |
GetLowerCase( string str )
Returns the lower-case version of a string. |
virtual string |
GetMixedCase( string str, bool initialUpper )
Returns the mixed-case version of a string. |
virtual string |
GetStringConstant( string str, char escape )
Creates a string constant from the specified string. |
virtual string |
GetUpperCase( string str )
Returns the upper-case version of a string. |
virtual ArrayList |
LineBreak( string str, int margin )
Returns a list with all the lines in a string. |
| Field Detail |
public static readonly CodeStyle C;
public static readonly CodeStyle CSHARP;
public static readonly CodeStyle JAVA;
public virtual int Margin;
public static readonly CodeStyle VISUAL_BASIC;
| Constructor Detail |
public CodeStyle( int margin, string indent );
margin - the print margin
indent - the indentation string| Method Detail |
public virtual string AddStringEscapes( string str, char escape );
str - the string to convert
escape - the escape character to usepublic virtual string GetIndent( int level );
level - the indentation levelpublic virtual string GetLowerCase( string str );
str - the string to transformpublic virtual string GetMixedCase( string str, bool initialUpper );
str - the string to transform
initialUpper - the first character upper-case flagpublic virtual string GetStringConstant( string str, char escape );
str - the string to convert
escape - the escape character to usepublic virtual string GetUpperCase( string str );
str - the string to transformpublic virtual ArrayList LineBreak( string str, int margin );
str - the string to line break
margin - the maximum line length
|
SourceFlow 1.0.beta API Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||