Blender V5.3
bsl::SymbolClass Struct Reference

#include <symbol_class.hh>

Inherits bsl::SymbolScope.

Classes

struct  MemberNode

Public Member Functions

 SymbolClass (SymbolScope *parent, ast::ClassDecl decl, const string &suffix="")
 SymbolClass (SymbolScope *parent, Token tok, const string &builtin_id, int size_in_bytes=1, int align_in_bytes=1, builtin::ClassId builtin_class=builtin::ClassId::Invalid)
void ensure_size_and_align (NodeErrorHandler *err_handler=nullptr, bool check_st430=false)
bool is_srt () const
bool is_builtin () const
Result< vector< MemberNode >, TokenException > get_all_members_flat () const
Public Member Functions inherited from bsl::SymbolScope
 SymbolScope (ast::LocalScope decl)
 SymbolScope (SymbolScope *parent, Token tok, const string &id, Type type)
 SymbolScope (SymbolScope *parent, ast::LocalScope decl)
 SymbolScope (SymbolScope *parent, ast::Id id, Type type)
SymbolVariable * lookup_variable (const SymbolTable &table, ast::IdQualified id) const
Result< SymbolFunction * > lookup_function (const SymbolTable &table, ast::IdQualified id, optional< SourceLocation > loc=nullopt) const
template<typename ArgOrParamList>
Result< SymbolFunction * > lookup_function (const SymbolTable &table, ast::IdQualified id, ArgOrParamList params, const SymbolScope &arguments_scope, optional< SourceLocation > loc=nullopt) const
Result< SymbolClass * > lookup_class (const SymbolTable &table, ast::IdQualified id, optional< SourceLocation > loc=nullopt) const
Result< SymbolClass * > lookup_class (const SymbolTable &table, ast::Id id, ast::Id last, optional< SourceLocation > loc=nullopt) const
SymbolVariable * lookup_variable (string id) const
SymbolFunction * lookup_function (string id) const
SymbolClass * lookup_class (string id) const
SymbolFunction * lookup_function_base (const SymbolTable &table, ast::IdQualified id) const
SymbolClass * lookup_class_base (const SymbolTable &table, ast::IdQualified id) const
std::pair< ast::FuncForwardDecl, SymbolFunction * > lookup_function_forward_decl (ast::FuncDecl decl) const
void print () const
const SymbolScope * root_scope () const
SymbolScope * root_scope ()
SymbolClass * as_class ()
SymbolFunction * as_function ()
const SymbolFunction * as_function () const
SymbolFunction * parent_function ()
const SymbolFunction * parent_function () const
bool function_emplace (SymbolFunction *fn, bool builtin=false)
bool variable_emplace (string id, SymbolVariable *var)
bool variable_emplace (SymbolVariable *var)
vector< SymbolVariable * > non_static_variables_in_declaration_order () const
SymbolScope * child_scope (int n)

Public Attributes

ResourceTableType srt_type = ResourceTableType::NONE
SymbolClassTemplate * template_data = nullptr
SymbolFunction * operator_subscript = nullptr
int size = -1
int align = -1
builtin::ClassId builtin_class = builtin::ClassId::Invalid
int8_t comp_len = 0
bool is_anonymous = false
bool is_union = false
bool is_enum = false
bool is_std140_compatible = false
bool is_std430_compatible = false
bool is_error = false
bool is_opaque = false
Public Attributes inherited from bsl::SymbolScope
friend SymbolParser
unordered_map< string, SymbolScope * > scopes
SymbolMap< SymbolVariable > variables
SymbolMap< SymbolFunction > functions
SymbolMap< SymbolClass > classes
vector< std::pair< ast::FuncForwardDecl, SymbolFunction * > > function_prototypes
optional< SourceLocation > poi
enum bsl::SymbolScope::Type type = ROOT
Public Attributes inherited from bsl::Symbol
string identifier
string original
SourceLocation loc
SymbolScope * parent = nullptr

Additional Inherited Members

Public Types inherited from bsl::SymbolScope
enum  Type {
  FUNCTION , CLASS , NAMESPACE , LOCAL ,
  ROOT
}

Detailed Description

Container for a class symbol and its metadata.

Definition at line 117 of file symbol_class.hh.

Constructor & Destructor Documentation

◆ SymbolClass() [1/2]

◆ SymbolClass() [2/2]

bsl::SymbolClass::SymbolClass ( SymbolScope * parent,
Token tok,
const string & builtin_id,
int size_in_bytes = 1,
int align_in_bytes = 1,
builtin::ClassId builtin_class = builtin::ClassId::Invalid )
inline

Member Function Documentation

◆ ensure_size_and_align()

◆ get_all_members_flat()

Result< vector< SymbolClass::MemberNode >, TokenException > bsl::SymbolClass::get_all_members_flat ( ) const

Definition at line 29 of file symbol_class.cc.

◆ is_builtin()

bool bsl::SymbolClass::is_builtin ( ) const
inline

◆ is_srt()

bool bsl::SymbolClass::is_srt ( ) const
inline

Member Data Documentation

◆ align

int bsl::SymbolClass::align = -1

Definition at line 125 of file symbol_class.hh.

Referenced by ensure_size_and_align(), and SymbolClass().

◆ builtin_class

◆ comp_len

int8_t bsl::SymbolClass::comp_len = 0

Definition at line 130 of file symbol_class.hh.

Referenced by bsl::ExpressionTypeParser::identifier().

◆ is_anonymous

bool bsl::SymbolClass::is_anonymous = false

◆ is_enum

bool bsl::SymbolClass::is_enum = false

◆ is_error

◆ is_opaque

bool bsl::SymbolClass::is_opaque = false

Definition at line 139 of file symbol_class.hh.

◆ is_std140_compatible

bool bsl::SymbolClass::is_std140_compatible = false

Definition at line 135 of file symbol_class.hh.

Referenced by ensure_size_and_align(), and bsl::SymbolParser::parse_var_decl().

◆ is_std430_compatible

bool bsl::SymbolClass::is_std430_compatible = false

Definition at line 136 of file symbol_class.hh.

Referenced by ensure_size_and_align(), and bsl::SymbolParser::parse_var_decl().

◆ is_union

bool bsl::SymbolClass::is_union = false

◆ operator_subscript

SymbolFunction* bsl::SymbolClass::operator_subscript = nullptr

◆ size

int bsl::SymbolClass::size = -1

Definition at line 124 of file symbol_class.hh.

Referenced by ensure_size_and_align(), SymbolClass(), and SymbolClass().

◆ srt_type

◆ template_data


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