C# Class Antlr4.StringTemplate.TemplateGroup

Show file Open project: antlr/antlrcs Class Usage Examples

Public Properties

Property Type Description
DefaultKey string
DictionaryKey string
GroupFileExtension string
TemplateFileExtension string

Protected Properties

Property Type Description
NotFoundTemplate Antlr4.StringTemplate.Compiler.CompiledTemplate
adaptors TypeRegistry

Public Methods

Method Description
Compile ( string srcName, string name, List args, string template, IToken templateToken ) : CompiledTemplate
CreateSingleton ( IToken templateToken ) : Template
CreateStringTemplate ( ) : Template
CreateStringTemplate ( CompiledTemplate impl ) : Template
CreateStringTemplateInternally ( CompiledTemplate impl ) : Template
CreateStringTemplateInternally ( Template prototype ) : Template
DefineDictionary ( string name, object>.IDictionary mapping ) : void
DefineRegion ( string enclosingTemplateName, IToken regionT, string template, IToken templateToken ) : CompiledTemplate
DefineTemplate ( string fullyQualifiedTemplateName, IToken nameT, List args, string template, IToken templateToken ) : CompiledTemplate
DefineTemplate ( string name, string template ) : CompiledTemplate
DefineTemplate ( string name, string template, string arguments ) : CompiledTemplate
DefineTemplateAlias ( IToken aliasT, IToken targetT ) : CompiledTemplate
DefineTemplateOrRegion ( string fullyQualifiedTemplateName, string regionSurroundingTemplateName, IToken templateToken, string template, IToken nameToken, List args ) : void
GetAttributeRenderer ( System.Type attributeType ) : IAttributeRenderer
GetInstanceOf ( string name ) : Template
GetMangledRegionName ( string enclosingTemplateName, string name ) : string
GetModelAdaptor ( System.Type attributeType ) : IModelAdaptor
GetTemplateNames ( ) : HashSet
GetTypeProxyFactory ( System.Type targetType ) : ITypeProxyFactory
GetUnmangledTemplateName ( string mangledName ) : string
ImportTemplates ( IToken fileNameToken ) : void
ImportTemplates ( TemplateGroup g ) : void
IsDefined ( string name ) : bool
IsDictionary ( string name ) : bool
Load ( ) : void
LoadAbsoluteTemplateFile ( string fileName ) : CompiledTemplate
LoadGroupFile ( string prefix, string fileName ) : void
LoadTemplateFile ( string prefix, string unqualifiedFileName, ICharStream templateStream ) : CompiledTemplate
LookupTemplate ( string name ) : CompiledTemplate
RawDefineTemplate ( string name, CompiledTemplate code, IToken defT ) : void
RawGetDictionary ( string name ) : object>.IDictionary
RawGetTemplate ( string name ) : CompiledTemplate
RegisterModelAdaptor ( System.Type attributeType, IModelAdaptor adaptor ) : void
RegisterRenderer ( System.Type attributeType, IAttributeRenderer renderer ) : void
RegisterRenderer ( System.Type attributeType, IAttributeRenderer renderer, bool recursive ) : void
RegisterTypeProxyFactory ( System.Type targetType, ITypeProxyFactory factory ) : void
SetDelimiters ( IToken openDelimiter, IToken closeDelimiter ) : void
SetDelimiters ( char delimiterStartChar, char delimiterStopChar ) : void
Show ( ) : string
TemplateGroup ( ) : System.Collections.Generic
TemplateGroup ( char delimiterStartChar, char delimiterStopChar ) : System.Collections.Generic
ToString ( ) : string
UndefineTemplate ( string name ) : void
Unload ( ) : void

Protected Methods

Method Description
GetEmbeddedInstanceOf ( Antlr4.StringTemplate.TemplateFrame frame, string name ) : Template
Load ( string name ) : CompiledTemplate
LookupImportedTemplate ( string name ) : CompiledTemplate

Private Methods

Method Description
CacheCompiledGroup ( string cachePath, string prefix, string fileName, System.DateTime lastWriteTime ) : void
CalculateReachableSerializedObjects ( ICollection rootSet ) : HashSet
CalculateReachableSerializedObjects ( object obj, HashSet reachableObjects ) : void
CreateGroupObject ( System.IO.BinaryReader reader, int key, object>.Dictionary objects ) : object
GetOrderedExports ( IEnumerable serializedObjects ) : List
GetOrderedExports ( object currentObject, List exportList, HashSet visited ) : void
ImportTemplates ( TemplateGroup group, bool clearOnUnload ) : void
LoadGroupObject ( System.IO.BinaryReader reader, int key, object>.Dictionary objects ) : void
TryLoadCachedGroup ( byte data, System.DateTime lastWriteTime ) : bool
TryLoadGroupFromCache ( string cachePath, string prefix, string fileName ) : bool
WriteGroupObject ( System.IO.BinaryWriter writer, object obj ) : void
WriteGroupObjectReference ( System.IO.BinaryWriter writer, object obj ) : void

Method Details

Compile() public method

public Compile ( string srcName, string name, List args, string template, IToken templateToken ) : CompiledTemplate
srcName string
name string
args List
template string
templateToken IToken
return Antlr4.StringTemplate.Compiler.CompiledTemplate

CreateSingleton() public method

public CreateSingleton ( IToken templateToken ) : Template
templateToken IToken
return Template

CreateStringTemplate() public method

public CreateStringTemplate ( ) : Template
return Template

CreateStringTemplate() public method

public CreateStringTemplate ( CompiledTemplate impl ) : Template
impl Antlr4.StringTemplate.Compiler.CompiledTemplate
return Template

CreateStringTemplateInternally() public method

public CreateStringTemplateInternally ( CompiledTemplate impl ) : Template
impl Antlr4.StringTemplate.Compiler.CompiledTemplate
return Template

CreateStringTemplateInternally() public method

public CreateStringTemplateInternally ( Template prototype ) : Template
prototype Template
return Template

DefineDictionary() public method

public DefineDictionary ( string name, object>.IDictionary mapping ) : void
name string
mapping object>.IDictionary
return void

DefineRegion() public method

public DefineRegion ( string enclosingTemplateName, IToken regionT, string template, IToken templateToken ) : CompiledTemplate
enclosingTemplateName string
regionT IToken
template string
templateToken IToken
return Antlr4.StringTemplate.Compiler.CompiledTemplate

DefineTemplate() public method

public DefineTemplate ( string fullyQualifiedTemplateName, IToken nameT, List args, string template, IToken templateToken ) : CompiledTemplate
fullyQualifiedTemplateName string
nameT IToken
args List
template string
templateToken IToken
return Antlr4.StringTemplate.Compiler.CompiledTemplate

DefineTemplate() public method

public DefineTemplate ( string name, string template ) : CompiledTemplate
name string
template string
return Antlr4.StringTemplate.Compiler.CompiledTemplate

DefineTemplate() public method

public DefineTemplate ( string name, string template, string arguments ) : CompiledTemplate
name string
template string
arguments string
return Antlr4.StringTemplate.Compiler.CompiledTemplate

DefineTemplateAlias() public method

public DefineTemplateAlias ( IToken aliasT, IToken targetT ) : CompiledTemplate
aliasT IToken
targetT IToken
return Antlr4.StringTemplate.Compiler.CompiledTemplate

DefineTemplateOrRegion() public method

public DefineTemplateOrRegion ( string fullyQualifiedTemplateName, string regionSurroundingTemplateName, IToken templateToken, string template, IToken nameToken, List args ) : void
fullyQualifiedTemplateName string
regionSurroundingTemplateName string
templateToken IToken
template string
nameToken IToken
args List
return void

GetAttributeRenderer() public method

public GetAttributeRenderer ( System.Type attributeType ) : IAttributeRenderer
attributeType System.Type
return IAttributeRenderer

GetEmbeddedInstanceOf() protected method

protected GetEmbeddedInstanceOf ( Antlr4.StringTemplate.TemplateFrame frame, string name ) : Template
frame Antlr4.StringTemplate.TemplateFrame
name string
return Template

GetInstanceOf() public method

public GetInstanceOf ( string name ) : Template
name string
return Template

GetMangledRegionName() public static method

public static GetMangledRegionName ( string enclosingTemplateName, string name ) : string
enclosingTemplateName string
name string
return string

GetModelAdaptor() public method

public GetModelAdaptor ( System.Type attributeType ) : IModelAdaptor
attributeType System.Type
return IModelAdaptor

GetTemplateNames() public method

public GetTemplateNames ( ) : HashSet
return HashSet

GetTypeProxyFactory() public method

public GetTypeProxyFactory ( System.Type targetType ) : ITypeProxyFactory
targetType System.Type
return ITypeProxyFactory

GetUnmangledTemplateName() public static method

public static GetUnmangledTemplateName ( string mangledName ) : string
mangledName string
return string

ImportTemplates() public method

public ImportTemplates ( IToken fileNameToken ) : void
fileNameToken IToken
return void

ImportTemplates() public method

public ImportTemplates ( TemplateGroup g ) : void
g TemplateGroup
return void

IsDefined() public method

public IsDefined ( string name ) : bool
name string
return bool

IsDictionary() public method

public IsDictionary ( string name ) : bool
name string
return bool

Load() protected method

protected Load ( string name ) : CompiledTemplate
name string
return Antlr4.StringTemplate.Compiler.CompiledTemplate

Load() public method

public Load ( ) : void
return void

LoadAbsoluteTemplateFile() public method

public LoadAbsoluteTemplateFile ( string fileName ) : CompiledTemplate
fileName string
return Antlr4.StringTemplate.Compiler.CompiledTemplate

LoadGroupFile() public method

public LoadGroupFile ( string prefix, string fileName ) : void
prefix string
fileName string
return void

LoadTemplateFile() public method

public LoadTemplateFile ( string prefix, string unqualifiedFileName, ICharStream templateStream ) : CompiledTemplate
prefix string
unqualifiedFileName string
templateStream ICharStream
return Antlr4.StringTemplate.Compiler.CompiledTemplate

LookupImportedTemplate() protected method

protected LookupImportedTemplate ( string name ) : CompiledTemplate
name string
return Antlr4.StringTemplate.Compiler.CompiledTemplate

LookupTemplate() public method

public LookupTemplate ( string name ) : CompiledTemplate
name string
return Antlr4.StringTemplate.Compiler.CompiledTemplate

RawDefineTemplate() public method

public RawDefineTemplate ( string name, CompiledTemplate code, IToken defT ) : void
name string
code Antlr4.StringTemplate.Compiler.CompiledTemplate
defT IToken
return void

RawGetDictionary() public method

public RawGetDictionary ( string name ) : object>.IDictionary
name string
return object>.IDictionary

RawGetTemplate() public method

public RawGetTemplate ( string name ) : CompiledTemplate
name string
return Antlr4.StringTemplate.Compiler.CompiledTemplate

RegisterModelAdaptor() public method

public RegisterModelAdaptor ( System.Type attributeType, IModelAdaptor adaptor ) : void
attributeType System.Type
adaptor IModelAdaptor
return void

RegisterRenderer() public method

public RegisterRenderer ( System.Type attributeType, IAttributeRenderer renderer ) : void
attributeType System.Type
renderer IAttributeRenderer
return void

RegisterRenderer() public method

public RegisterRenderer ( System.Type attributeType, IAttributeRenderer renderer, bool recursive ) : void
attributeType System.Type
renderer IAttributeRenderer
recursive bool
return void

RegisterTypeProxyFactory() public method

public RegisterTypeProxyFactory ( System.Type targetType, ITypeProxyFactory factory ) : void
targetType System.Type
factory ITypeProxyFactory
return void

SetDelimiters() public method

public SetDelimiters ( IToken openDelimiter, IToken closeDelimiter ) : void
openDelimiter IToken
closeDelimiter IToken
return void

SetDelimiters() public method

public SetDelimiters ( char delimiterStartChar, char delimiterStopChar ) : void
delimiterStartChar char
delimiterStopChar char
return void

Show() public method

public Show ( ) : string
return string

TemplateGroup() public method

public TemplateGroup ( ) : System.Collections.Generic
return System.Collections.Generic

TemplateGroup() public method

public TemplateGroup ( char delimiterStartChar, char delimiterStopChar ) : System.Collections.Generic
delimiterStartChar char
delimiterStopChar char
return System.Collections.Generic

ToString() public method

public ToString ( ) : string
return string

UndefineTemplate() public method

public UndefineTemplate ( string name ) : void
name string
return void

Unload() public method

public Unload ( ) : void
return void

Property Details

DefaultKey public static property

public static string DefaultKey
return string

DictionaryKey public static property

public static string DictionaryKey
return string

GroupFileExtension public static property

public static string GroupFileExtension
return string

NotFoundTemplate protected static property

protected static CompiledTemplate,Antlr4.StringTemplate.Compiler NotFoundTemplate
return Antlr4.StringTemplate.Compiler.CompiledTemplate

TemplateFileExtension public static property

public static string TemplateFileExtension
return string

adaptors protected property

protected TypeRegistry adaptors
return TypeRegistry