CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::ObjectExpression Struct Reference

#include <CeresEngine/Material/ShaderCompiler/AST/AST.hpp>

Inheritance diagram for CeresEngine::ShaderCompiler::ObjectExpression:
CeresEngine::ShaderCompiler::Expression CeresEngine::ShaderCompiler::TypedAST CeresEngine::ShaderCompiler::AST

Public Types

enum  : UInt32 { isImmutable = (1u << ( 1 )) , isBaseStructNamespace = (1u << ( 2 )) }
 
- Public Types inherited from CeresEngine::ShaderCompiler::Expression
enum  : UInt32 { wasConverted = (1u << ( 0 )) }
 
- Public Types inherited from CeresEngine::ShaderCompiler::AST
enum class  Types {
  Program , CodeBlock , Attribute , SwitchCase ,
  SamplerValue , Register , PackOffset , ArrayDimension ,
  TypeSpecifier , VarDeclaration , BufferDeclaration , SamplerDeclaration ,
  StructDeclaration , AliasDeclaration , FunctionDeclaration , UniformBufferDeclaration ,
  VarDeclarationStatement , BufferDeclarationStatement , SamplerDeclarationStatement , AliasDeclarationStatement ,
  BasicDeclarationStatement , NullStatement , CodeBlockStatement , ForLoopStatement ,
  WhileLoopStatement , DoWhileLoopStatement , IfStatement , ElseStatement ,
  SwitchStatement , ExpressionStatement , ReturnStatement , CtrlTransferStatement ,
  LayoutStatement , NullExpression , SequenceExpression , LiteralExpression ,
  TypeSpecifierExpression , TernaryExpression , BinaryExpression , UnaryExpression ,
  PostUnaryExpression , CallExpression , BracketExpression , ObjectExpression ,
  AssignExpression , ArrayExpression , CastExpression , InitializerExpression
}
 
enum  : UInt32 { isReachable = (1u << ( 30 )) , isDeadCode = (1u << ( 29 )) , isBuiltin = (1u << ( 28 )) }
 

Public Member Functions

 ObjectExpression (const SourcePosition &astPos)
 
 ObjectExpression (const SourceArea &astArea)
 
Types getType () const override
 
void visit (Visitor *visitor, void *args=nullptr) override
 
TypeDenoterPtr deriveTypeDenoter (const TypeDenoter *expectedTypeDenoter) override
 
const Expressionfind (const FindPredicateConstFunctor &predicate, UInt32 flags=SearchAll) const override
 
const ObjectExpressionfetchLValueExpression () const override
 Returns the first node in the expression tree that is an l-value (may also be constant!), or null if there is no l-value.
 
IndexedSemantic fetchSemantic () const override
 
bool isTrivialCopyable (UInt32 maxTreeDepth=3) const override
 
BaseTypeDenoterPtr getTypeDenoterFromSubscript () const
 
String toStringAsNamespace () const
 
void replaceSymbol (Declaration *symbol)
 
template<typename T >
TfetchSymbol () const
 
VarDeclarationfetchVarDeclaration () const
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::Expression
VarDeclarationfetchVarDeclaration () const
 
ObjectExpressionfetchLValueExpression ()
 
const ExpressionfindFirstOf (const Types expressionType, UInt32 flags=SearchAll) const
 
const ExpressionfindFirstNotOf (const Types expressionType, UInt32 flags=SearchAll) const
 
Expressionfind (const FindPredicateConstFunctor &predicate, UInt32 flags=SearchAll)
 
ExpressionfindFirstOf (const Types expressionType, UInt32 flags=SearchAll)
 
ExpressionfindFirstNotOf (const Types expressionType, UInt32 flags=SearchAll)
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::TypedAST
const TypeDenoterPtrgetTypeDenoter (const TypeDenoter *expectedTypeDenoter=nullptr)
 
void resetTypeDenoter ()
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::AST
virtual ~AST ()
 
template<typename T >
Tas ()
 
template<typename T >
const Tas () const
 

Public Attributes

ExpressionPtr prefixExpression
 
bool isStatic = false
 
String ident
 
DeclarationsymbolRef = nullptr
 
- Public Attributes inherited from CeresEngine::ShaderCompiler::AST
SourceArea area
 
RawFlags flags
 

Static Public Attributes

static const Types classType = Types:: ObjectExpression
 

Additional Inherited Members

- Static Public Member Functions inherited from CeresEngine::ShaderCompiler::AST
template<typename T >
static TgetAs (AST *ast)
 
template<typename T >
static const TgetAs (const AST *ast)
 

Member Enumeration Documentation

◆ anonymous enum

Enumerator
isImmutable 
isBaseStructNamespace 

Constructor & Destructor Documentation

◆ ObjectExpression() [1/2]

CeresEngine::ShaderCompiler::ObjectExpression::ObjectExpression ( const SourcePosition astPos)
inlineexplicit

◆ ObjectExpression() [2/2]

CeresEngine::ShaderCompiler::ObjectExpression::ObjectExpression ( const SourceArea astArea)
inlineexplicit

Member Function Documentation

◆ deriveTypeDenoter()

TypeDenoterPtr CeresEngine::ShaderCompiler::ObjectExpression::deriveTypeDenoter ( const TypeDenoter expectedTypeDenoter)
overridevirtual

◆ fetchLValueExpression()

const ObjectExpression * CeresEngine::ShaderCompiler::ObjectExpression::fetchLValueExpression ( ) const
overridevirtual

Returns the first node in the expression tree that is an l-value (may also be constant!), or null if there is no l-value.

If the return value is non-null, the object expression must refer to a declaration object. By default null.

Reimplemented from CeresEngine::ShaderCompiler::Expression.

◆ fetchSemantic()

IndexedSemantic CeresEngine::ShaderCompiler::ObjectExpression::fetchSemantic ( ) const
overridevirtual

◆ fetchSymbol()

template<typename T >
T * CeresEngine::ShaderCompiler::ObjectExpression::fetchSymbol ( ) const
inline

◆ fetchVarDeclaration()

VarDeclaration * CeresEngine::ShaderCompiler::ObjectExpression::fetchVarDeclaration ( ) const

◆ find()

const Expression * CeresEngine::ShaderCompiler::ObjectExpression::find ( const FindPredicateConstFunctor predicate,
UInt32  flags = SearchAll 
) const
overridevirtual

◆ getType()

Types CeresEngine::ShaderCompiler::ObjectExpression::getType ( ) const
inlineoverridevirtual

◆ getTypeDenoterFromSubscript()

BaseTypeDenoterPtr CeresEngine::ShaderCompiler::ObjectExpression::getTypeDenoterFromSubscript ( ) const

◆ isTrivialCopyable()

bool CeresEngine::ShaderCompiler::ObjectExpression::isTrivialCopyable ( UInt32  maxTreeDepth = 3) const
overridevirtual

◆ replaceSymbol()

void CeresEngine::ShaderCompiler::ObjectExpression::replaceSymbol ( Declaration symbol)

◆ toStringAsNamespace()

String CeresEngine::ShaderCompiler::ObjectExpression::toStringAsNamespace ( ) const

◆ visit()

void CeresEngine::ShaderCompiler::ObjectExpression::visit ( Visitor visitor,
void args = nullptr 
)
inlineoverridevirtual

Member Data Documentation

◆ classType

const Types CeresEngine::ShaderCompiler::ObjectExpression::classType = Types:: ObjectExpression
static

◆ ident

String CeresEngine::ShaderCompiler::ObjectExpression::ident

◆ isStatic

bool CeresEngine::ShaderCompiler::ObjectExpression::isStatic = false

◆ prefixExpression

ExpressionPtr CeresEngine::ShaderCompiler::ObjectExpression::prefixExpression

◆ symbolRef

Declaration* CeresEngine::ShaderCompiler::ObjectExpression::symbolRef = nullptr

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