Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Shaders.Analysis.AnalysisBase Class Referenceabstract

Base class for analysis. More...

Inheritance diagram for SiliconStudio.Shaders.Analysis.AnalysisBase:
SiliconStudio.Shaders.Visitor.ShaderVisitor SiliconStudio.Shaders.Visitor.VisitorBase SiliconStudio.Shaders.Analysis.CastAnalysis SiliconStudio.Shaders.Analysis.SemanticAnalysis SiliconStudio.Shaders.Analysis.Hlsl.HlslSemanticAnalysis

Public Member Functions

abstract void Run ()
 Runs this instance. More...
 

Protected Member Functions

 AnalysisBase (ParsingResult result)
 Initializes a new instance of the AnalysisBase class. More...
 
void Error (MessageCode message, SourceSpan span)
 Logs an Error with the specified message. More...
 
void Error (MessageCode message, SourceSpan span, params object[] parameters)
 Logs an Error with the specified message. More...
 
void Info (string message, SourceSpan span)
 Logs an Info with the specified message. More...
 
void Info (string message, SourceSpan span, params object[] parameters)
 Logs an Info with the specified message. More...
 
void Warning (MessageCode message, SourceSpan span)
 Logs an Warning with the specified message. More...
 
void Warning (MessageCode message, SourceSpan span, params object[] parameters)
 Logs an Warning with the specified message. More...
 
virtual TypeBase GetBinaryImplicitConversionType (SourceSpan span, TypeBase left, TypeBase right, bool isBinaryOperator)
 Gets the type of the binary implicit conversion. More...
 
virtual TypeBase GetMultiplyImplicitConversionType (SourceSpan span, TypeBase left, TypeBase right)
 Gets the type of the binary implicit conversion. More...
 
virtual TypeBase GetDivideImplicitConversionType (SourceSpan span, TypeBase left, TypeBase right)
 Gets the type of the binary implicit conversion. More...
 
ScalarType GetBinaryImplicitScalarConversionType (SourceSpan span, TypeBase left, TypeBase right)
 Gets the type of the binary implicit scalar conversion. More...
 
- Protected Member Functions inherited from SiliconStudio.Shaders.Visitor.ShaderVisitor
 ShaderVisitor (bool buildScopeDeclaration, bool useNodeStack)
 Initializes a new instance of the ShaderVisitor class. More...
 
virtual ScopeDeclaration NewScope (IScopeContainer container=null)
 
virtual Node Visit (Node node)
 
virtual IEnumerable< IDeclarationFindDeclarations (string name)
 Finds a list of declaration by its name. More...
 
IDeclaration FindDeclaration (string name)
 Finds a declaration by its name. More...
 
override bool PreVisitNode (Node node)
 Called before visiting the node. More...
 
override void PostVisitNode (Node node, bool nodeVisited)
 Called after visiting the node. More...
 
- Protected Member Functions inherited from SiliconStudio.Shaders.Visitor.VisitorBase
 VisitorBase (bool useNodeStack=false)
 Initializes a new instance of the VisitorBase class. More...
 
void VisitDynamicList< T > (IList< T > list, Func< T, bool > filter=null)
 Visits the list. More...
 
virtual Node VisitDynamic< T > (T node, bool visitRealType=true)
 Visits the node. More...
 

Properties

ParsingResult ParsingResult [get, set]
 Gets the parsing result. More...
 
- Properties inherited from SiliconStudio.Shaders.Visitor.ShaderVisitor
Node ParentNode [get]
 Gets the parent node or null if no parents More...
 
Stack< ScopeDeclarationScopeStack [get, set]
 Gets the scope stack. More...
 
- Properties inherited from SiliconStudio.Shaders.Visitor.VisitorBase
List< NodeNodeStack [get, set]
 Gets or sets the node stack. More...
 

Detailed Description

Base class for analysis.

Definition at line 14 of file AnalysisBase.cs.

Constructor & Destructor Documentation

SiliconStudio.Shaders.Analysis.AnalysisBase.AnalysisBase ( ParsingResult  result)
protected

Initializes a new instance of the AnalysisBase class.

Parameters
resultThe result.

Definition at line 20 of file AnalysisBase.cs.

Member Function Documentation

void SiliconStudio.Shaders.Analysis.AnalysisBase.Error ( MessageCode  message,
SourceSpan  span 
)
protected

Logs an Error with the specified message.

Parameters
messageThe message.
spanThe span.

Definition at line 40 of file AnalysisBase.cs.

void SiliconStudio.Shaders.Analysis.AnalysisBase.Error ( MessageCode  message,
SourceSpan  span,
params object[]  parameters 
)
protected

Logs an Error with the specified message.

Parameters
messageThe message.
spanThe span.
parametersThe parameters.

Definition at line 51 of file AnalysisBase.cs.

virtual TypeBase SiliconStudio.Shaders.Analysis.AnalysisBase.GetBinaryImplicitConversionType ( SourceSpan  span,
TypeBase  left,
TypeBase  right,
bool  isBinaryOperator 
)
protectedvirtual

Gets the type of the binary implicit conversion.

Parameters
spanThe span.
leftThe left.
rightThe right.
isBinaryOperatorif set to true [is binary operator].
Returns
The implicit conversion between between to two types

Definition at line 108 of file AnalysisBase.cs.

References SiliconStudio.Shaders.Utility.MessageCode.ErrorBinaryTypeDeduction.

ScalarType SiliconStudio.Shaders.Analysis.AnalysisBase.GetBinaryImplicitScalarConversionType ( SourceSpan  span,
TypeBase  left,
TypeBase  right 
)
protected

Gets the type of the binary implicit scalar conversion.

Parameters
spanThe span.
leftThe left.
rightThe right.
Returns
The implicit conversion between the two scalar types

Definition at line 161 of file AnalysisBase.cs.

References SiliconStudio.Shaders.Utility.MessageCode.ErrorScalarTypeConversion.

virtual TypeBase SiliconStudio.Shaders.Analysis.AnalysisBase.GetDivideImplicitConversionType ( SourceSpan  span,
TypeBase  left,
TypeBase  right 
)
protectedvirtual

Gets the type of the binary implicit conversion.

Parameters
spanThe span.
leftThe left.
rightThe right.
Returns
The implicit conversion between between to two types

Definition at line 142 of file AnalysisBase.cs.

References SiliconStudio.Shaders.Utility.MessageCode.ErrorBinaryTypeDeduction, and SiliconStudio.Shaders.Ast.TypeBase.ResolveType().

virtual TypeBase SiliconStudio.Shaders.Analysis.AnalysisBase.GetMultiplyImplicitConversionType ( SourceSpan  span,
TypeBase  left,
TypeBase  right 
)
protectedvirtual

Gets the type of the binary implicit conversion.

Parameters
spanThe span.
leftThe left.
rightThe right.
Returns
The implicit conversion between between to two types

Definition at line 125 of file AnalysisBase.cs.

References SiliconStudio.Shaders.Utility.MessageCode.ErrorBinaryTypeDeduction, and SiliconStudio.Shaders.Ast.TypeBase.ResolveType().

void SiliconStudio.Shaders.Analysis.AnalysisBase.Info ( string  message,
SourceSpan  span 
)
protected

Logs an Info with the specified message.

Parameters
messageThe message.
spanThe span.

Definition at line 61 of file AnalysisBase.cs.

void SiliconStudio.Shaders.Analysis.AnalysisBase.Info ( string  message,
SourceSpan  span,
params object[]  parameters 
)
protected

Logs an Info with the specified message.

Parameters
messageThe message.
spanThe span.
parametersThe parameters.

Definition at line 72 of file AnalysisBase.cs.

abstract void SiliconStudio.Shaders.Analysis.AnalysisBase.Run ( )
pure virtual
void SiliconStudio.Shaders.Analysis.AnalysisBase.Warning ( MessageCode  message,
SourceSpan  span 
)
protected

Logs an Warning with the specified message.

Parameters
messageThe message.
spanThe span.

Definition at line 82 of file AnalysisBase.cs.

void SiliconStudio.Shaders.Analysis.AnalysisBase.Warning ( MessageCode  message,
SourceSpan  span,
params object[]  parameters 
)
protected

Logs an Warning with the specified message.

Parameters
messageThe message.
spanThe span.
parametersThe parameters.

Definition at line 93 of file AnalysisBase.cs.

Property Documentation

ParsingResult SiliconStudio.Shaders.Analysis.AnalysisBase.ParsingResult
getset

Gets the parsing result.

Definition at line 28 of file AnalysisBase.cs.


The documentation for this class was generated from the following file: