C# 클래스 Mlos.SettingsSystem.CodeGen.CodeWriters.CodeWriter

Base class for all code writers.
파일 보기 프로젝트 열기: microsoft/MLOS

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Accept ( Type sourceType ) : bool

Does code writer support source type.

BeginVisitType ( Type sourceType ) : void

Write class beginning.

EndVisitType ( Type sourceType ) : void

Write class closing brackets.

GetGeneratedString ( ) : string

Return a generated code as a string.

VisitConstField ( CppConstField cppConstField ) : void

Write a struct const field definition.

VisitField ( CppField cppField ) : void

Write a struct field definition.

WriteBeginFile ( ) : void

Write beginning of the file.

WriteCloseTypeNamespace ( string @namespace ) : void

Write namespace closing after type definition.

WriteComments ( CodeComment codeComment ) : void

Write code comments.

WriteEndFile ( ) : void

Write end of the file.

WriteOpenTypeNamespace ( string @namespace ) : void

Write namespace opening before type definition.

보호된 메소드들

메소드 설명
WriteBlock ( ) : void

Writes an indented block of lines.

Expected to be used with block string literals like so: As such the first empty line is trimmed.

WriteLine ( ) : void

Writes a blank line.

WriteLine ( string value ) : void

Writes an indented line with the given string.

메소드 상세

Accept() 공개 추상적인 메소드

Does code writer support source type.
public abstract Accept ( Type sourceType ) : bool
sourceType Type
리턴 bool

BeginVisitType() 공개 추상적인 메소드

Write class beginning.
public abstract BeginVisitType ( Type sourceType ) : void
sourceType Type
리턴 void

EndVisitType() 공개 추상적인 메소드

Write class closing brackets.
public abstract EndVisitType ( Type sourceType ) : void
sourceType Type
리턴 void

GetGeneratedString() 공개 메소드

Return a generated code as a string.
public GetGeneratedString ( ) : string
리턴 string

VisitConstField() 공개 추상적인 메소드

Write a struct const field definition.
public abstract VisitConstField ( CppConstField cppConstField ) : void
cppConstField CppConstField
리턴 void

VisitField() 공개 추상적인 메소드

Write a struct field definition.
public abstract VisitField ( CppField cppField ) : void
cppField CppField
리턴 void

WriteBeginFile() 공개 추상적인 메소드

Write beginning of the file.
public abstract WriteBeginFile ( ) : void
리턴 void

WriteBlock() 보호된 메소드

Writes an indented block of lines.
Expected to be used with block string literals like so: As such the first empty line is trimmed.
protected WriteBlock ( ) : void
리턴 void

WriteCloseTypeNamespace() 공개 추상적인 메소드

Write namespace closing after type definition.
public abstract WriteCloseTypeNamespace ( string @namespace ) : void
@namespace string
리턴 void

WriteComments() 공개 추상적인 메소드

Write code comments.
public abstract WriteComments ( CodeComment codeComment ) : void
codeComment CodeComment
리턴 void

WriteEndFile() 공개 추상적인 메소드

Write end of the file.
public abstract WriteEndFile ( ) : void
리턴 void

WriteLine() 보호된 메소드

Writes a blank line.
protected WriteLine ( ) : void
리턴 void

WriteLine() 보호된 메소드

Writes an indented line with the given string.
protected WriteLine ( string value ) : void
value string
리턴 void

WriteOpenTypeNamespace() 공개 추상적인 메소드

Write namespace opening before type definition.
public abstract WriteOpenTypeNamespace ( string @namespace ) : void
@namespace string
리턴 void