Class BasicTransformContext
Inheritance
BasicTransformContext
Assembly: Microsoft.ML.Probabilistic.Compiler.dll
Syntax
public class BasicTransformContext : StackContext, ICodeTransformContext
Fields
outputOfElement
The output of each input element. Collected only if trackTransform=true. Used by DeclarationView.
Declaration
public List<KeyValuePair<object, TransformOutput>> outputOfElement
Field Value
OutputStack
The output of each input element on the InputStack. Updated only if trackTransform=true. Used by DeclarationView.
Declaration
protected Stack<TransformOutput> OutputStack
Field Value
results
Declaration
protected TransformResults results
Field Value
trackTransform
Indicates if the association between input and output elements should be stored.
Declaration
public bool trackTransform
Field Value
typesToTransform
Declaration
protected List<ITypeDeclaration> typesToTransform
Field Value
Properties
InputAttributes
Declaration
public AttributeRegistry<object, ICompilerAttribute> InputAttributes { get; set; }
Property Value
OutputAttributes
Declaration
public AttributeRegistry<object, ICompilerAttribute> OutputAttributes { get; }
Property Value
Results
Declaration
public TransformResults Results { get; set; }
Property Value
TypesToTransform
Declaration
public List<ITypeDeclaration> TypesToTransform { get; }
Property Value
Methods
AddMember(IMemberDeclaration)
Declaration
public virtual void AddMember(IMemberDeclaration imd)
Parameters
AddOutput(Object)
Declaration
protected void AddOutput(object outputElement)
Parameters
Type |
Name |
Description |
Object |
outputElement |
|
AddStatementAfterAncestorIndex(Int32, IStatement, Boolean)
Declaration
public override void AddStatementAfterAncestorIndex(int ancInd, IStatement statementToAdd, bool convertBeforeAdding = false)
Parameters
Overrides
AddStatementBeforeAncestorIndex(Int32, IStatement, Boolean)
Declaration
public override void AddStatementBeforeAncestorIndex(int ancInd, IStatement stmt, bool convertBeforeAdding = false)
Parameters
Overrides
Close(Object)
Closes the current input object, indicating that its transformation has been completed.
Declaration
protected virtual void Close(object inputItem)
Parameters
Type |
Name |
Description |
Object |
inputItem |
|
CloseExpression(IExpression)
Declaration
public virtual void CloseExpression(IExpression iexpr)
Parameters
CloseMember(IMemberDeclaration)
Declaration
public virtual void CloseMember(IMemberDeclaration imd)
Parameters
CloseOutput(Object)
Declaration
protected void CloseOutput(object inputItem)
Parameters
Type |
Name |
Description |
Object |
inputItem |
|
CloseStatement(IStatement)
Declaration
public virtual void CloseStatement(IStatement istmt)
Parameters
CloseType(ITypeDeclaration)
Declaration
public virtual void CloseType(ITypeDeclaration itd)
Parameters
Error(String)
Declaration
public void Error(string msg)
Parameters
Type |
Name |
Description |
String |
msg |
|
Error(String, Exception)
Declaration
public void Error(string msg, Exception ex)
Parameters
Error(String, Exception, Object)
Declaration
public void Error(string msg, Exception ex, object inputElement)
Parameters
FatalError(String)
Declaration
public void FatalError(string msg)
Parameters
Type |
Name |
Description |
String |
msg |
|
GetAttribute<T>(Object)
Declaration
public T GetAttribute<T>(object obj)
where T : class, ICompilerAttribute
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Type Parameters
GetContextString()
Declaration
protected string GetContextString()
Returns
Open(Object)
Opens the input object for transforming.
Declaration
protected virtual void Open(object inputItem)
Parameters
Type |
Name |
Description |
Object |
inputItem |
Input code element
|
OpenExpression(IExpression)
Declaration
public virtual void OpenExpression(IExpression iexpr)
Parameters
OpenMember(IMemberDeclaration)
Declaration
public virtual void OpenMember(IMemberDeclaration imd)
Parameters
OpenOutput()
Declaration
protected virtual void OpenOutput()
OpenStatement(IStatement)
Declaration
public virtual void OpenStatement(IStatement istmt)
Parameters
OpenType(ITypeDeclaration)
Declaration
public virtual void OpenType(ITypeDeclaration itd)
Parameters
SetPrimaryOutput(Object)
Declaration
public override void SetPrimaryOutput(object outputItem)
Parameters
Type |
Name |
Description |
Object |
outputItem |
|
Overrides
Warning(String)
Declaration
public void Warning(string msg)
Parameters
Type |
Name |
Description |
String |
msg |
|
Warning(String, Exception)
Declaration
public void Warning(string msg, Exception ex)
Parameters
Implements