top | up | prev | next

SymbolReader Class

Definition at line 28 of SymbolReader.hpp

Constructors

SymbolReader(const std::string& fileName_)

Member Functions

void AddArrayType(ArrayTypeSymbol* arrayType)
void AddClassTemplateSpecialization(ClassTemplateSpecializationSymbol* classTemplateSpecialization)
void AddConversion(FunctionSymbol* conversion)
void AddDerivedType(DerivedTypeSymbol* derivedType)
void AddFunctionRequest(FunctionRequest&& functionRequest)
void AddTypeOrConceptRequest(TypeOrConceptRequest&& typeOrConceptRequest)
AstReader& GetAstReader()
BinaryReader& GetBinaryReader()
Module* GetModule() const
SymbolTable* GetSymbolTable() const
ArrayTypeSymbol* ReadArrayTypeSymbol(Symbol* parent)
ClassTemplateSpecializationSymbol* ReadClassTemplateSpecializationSymbol(Symbol* parent)
DerivedTypeSymbol* ReadDerivedTypeSymbol(Symbol* parent)
ParameterSymbol* ReadParameterSymbol(Symbol* parent)
Symbol* ReadSymbol(Symbol* parent)
Module* RootModuleId() const
void SetArrayTypesTarget(std::vector<ArrayTypeSymbol*>* arrayTypesTarget)
void SetClassTemplateSpecializationTarget(std::vector<ClassTemplateSpecializationSymbol*>* classTemplateSpecializationTarget)
void SetConversionsTarget(std::vector<FunctionSymbol*>* conversionsTarget)
void SetDerivedTypesTarget(std::vector<DerivedTypeSymbol*>* derivedTypesTarget)
void SetFunctionRequestTarget(std::vector<FunctionRequest>* functionRequestTarget)
void SetModule(Module* module_)
bool SetProjectBit() const
void SetProjectBitForSymbols()
void SetRootModule(Module* rootModule_)
void SetSymbolTable(SymbolTable* symbolTable_)
void SetTypeAndConceptRequestTarget(std::vector<TypeOrConceptRequest>* typeAndConceptRequestTarget)

Member Variables

std::vector<ArrayTypeSymbol*>* arrayTypes
AstReader astReader
std::vector<ClassTemplateSpecializationSymbol*>* classTemplateSpecializations
std::vector<FunctionSymbol*>* conversions
std::vector<DerivedTypeSymbol*>* derivedTypes
std::vector<FunctionRequest>* functionRequests
Module* module
Module* rootModule
bool setProjectBit
SymbolTable* symbolTable
bool symbolsCached
std::vector<TypeOrConceptRequest>* typeAndConceptRequests

Constructor Details

SymbolReader Constructor

cmajor::symbols::SymbolReader::SymbolReader(const std::string& fileName_)

Definition at line 14 of SymbolReader.cpp :
 14 :
 15 astReader(fileName_)symbolTable(nullptr)module(nullptr)rootModule(nullptr)conversions(nullptr)arrayTypes(nullptr)derivedTypes(nullptr)
 16 classTemplateSpecializations(nullptr)typeAndConceptRequests(nullptr)functionRequests(nullptr)setProjectBit(false)symbolsCached(false)
 17 {
 18 }


Declaration at line 31 of SymbolReader.hpp


Member Function Details

AddArrayType Member Function

void cmajor::symbols::SymbolReader::AddArrayType(ArrayTypeSymbol * arrayType)

Definition at line 98 of SymbolReader.cpp :
 99 {
100     if (arrayTypes)
101     {
102         arrayTypes->push_back(arrayType);
103     }
104     else
105     {
106         throw std::runtime_error("reader array types target not set");
107     }
108 }


Declaration at line 50 of SymbolReader.hpp

Called by: cmajor::symbols::SymbolTable::Read


AddClassTemplateSpecialization Member Function

void cmajor::symbols::SymbolReader::AddClassTemplateSpecialization(ClassTemplateSpecializationSymbol * classTemplateSpecialization)

Definition at line 122 of SymbolReader.cpp :
123 {
124     if (classTemplateSpecializations)
125     {
126         classTemplateSpecializations->push_back(classTemplateSpecialization);
127     }
128     else
129     {
130         throw std::runtime_error("reader class template specialization target not set");
131     }
132 }


Declaration at line 52 of SymbolReader.hpp

Called by: cmajor::symbols::SymbolTable::Read


AddConversion Member Function

void cmajor::symbols::SymbolReader::AddConversion(FunctionSymbol * conversion)

Definition at line 86 of SymbolReader.cpp :
 87 {
 88     if (conversions)
 89     {
 90         conversions->push_back(conversion);
 91     }
 92     else
 93     {
 94         throw std::runtime_error("reader conversions target not set");
 95     }
 96 }


Declaration at line 49 of SymbolReader.hpp

Called by: cmajor::symbols::FunctionSymbol::Read


AddDerivedType Member Function

void cmajor::symbols::SymbolReader::AddDerivedType(DerivedTypeSymbol * derivedType)

Definition at line 110 of SymbolReader.cpp :
111 {
112     if (derivedTypes)
113     {
114         derivedTypes->push_back(derivedType);
115     }
116     else
117     {
118         throw std::runtime_error("reader derived types target not set");
119     }
120 }


Declaration at line 51 of SymbolReader.hpp

Called by: cmajor::symbols::SymbolTable::Read


AddFunctionRequest Member Function

void cmajor::symbols::SymbolReader::AddFunctionRequest(FunctionRequest && functionRequest)

Definition at line 146 of SymbolReader.cpp :
147 {
148     if (functionRequests)
149     {
150         functionRequests->push_back(std::move(functionRequest));
151     }
152     else
153     {
154         throw std::runtime_error("reader function request target not set");
155     }
156 }


Declaration at line 54 of SymbolReader.hpp

Called by: cmajor::symbols::SymbolTable::EmplaceFunctionRequest


AddTypeOrConceptRequest Member Function

void cmajor::symbols::SymbolReader::AddTypeOrConceptRequest(TypeOrConceptRequest && typeOrConceptRequest)

Definition at line 134 of SymbolReader.cpp :
135 {
136     if (typeAndConceptRequests)
137     {
138         typeAndConceptRequests->push_back(std::move(typeOrConceptRequest));
139     }
140     else
141     {
142         throw std::runtime_error("reader type and concept request target not set");
143     }
144 }


Declaration at line 53 of SymbolReader.hpp

Called by: cmajor::symbols::SymbolTable::EmplaceTypeOrConceptRequest


GetAstReader Member Function

AstReader & cmajor::symbols::SymbolReader::GetAstReader()

Definition at line 32 of SymbolReader.hpp :
32 { return astReader; }

Called by: cmajor::symbols::ClassTypeSymbol::Read , cmajor::symbols::ConceptSymbol::Read , cmajor::symbols::FunctionSymbol::Read , cmajor::symbols::Symbol::Read


GetBinaryReader Member Function

BinaryReader& cmajor::symbols::SymbolReader::GetBinaryReader()

Definition at line 33 of SymbolReader.hpp :
33 { return astReader.GetBinaryReader(); }

Calls: sngcm::ast::AstReader::GetBinaryReader

Called by: cmajor::symbols::ArrayBeginFunction::Read , cmajor::symbols::ArrayCBeginFunction::Read , cmajor::symbols::ArrayCEndFunction::Read , cmajor::symbols::ArrayEndFunction::Read , cmajor::symbols::ArrayLengthFunction::Read , cmajor::symbols::ArrayTypeSymbol::Read , cmajor::symbols::BasicTypeConversion::Read , cmajor::symbols::BasicTypeSymbol::Read , cmajor::symbols::BoundTemplateParameterSymbol::Read , cmajor::symbols::ClassDelegateTypeDefaultConstructor::Read , cmajor::symbols::ClassDelegateTypeSymbol::Read , cmajor::symbols::ClassTemplateSpecializationSymbol::Read , cmajor::symbols::ClassTypeSymbol::Read , cmajor::symbols::ConceptSymbol::Read , cmajor::symbols::ConstantSymbol::Read , cmajor::symbols::ContainerSymbol::Read , cmajor::symbols::DelegateTypeDefaultConstructor::Read , cmajor::symbols::DelegateTypeSymbol::Read , cmajor::symbols::DerivedTypeSymbol::Read , cmajor::symbols::DestructorSymbol::Read , cmajor::symbols::EnumConstantSymbol::Read , cmajor::symbols::EnumTypeCopyAssignment::Read , cmajor::symbols::EnumTypeCopyConstructor::Read , cmajor::symbols::EnumTypeDefaultConstructor::Read , cmajor::symbols::EnumTypeEqualityOp::Read , cmajor::symbols::EnumTypeMoveAssignment::Read , cmajor::symbols::EnumTypeMoveConstructor::Read , cmajor::symbols::EnumTypeReturn::Read , cmajor::symbols::EnumTypeSymbol::Read , cmajor::symbols::EnumTypeToUnderlyingTypeConversion::Read , cmajor::symbols::FunctionSymbol::Read , cmajor::symbols::GlobalVariableSymbol::Read , cmajor::symbols::MemberVariableSymbol::Read , cmajor::symbols::Module::ReadHeader , cmajor::symbols::ModuleTag::Read , cmajor::symbols::ParameterSymbol::Read , cmajor::symbols::Symbol::Read , cmajor::symbols::SymbolReader::ReadSymbol , cmajor::symbols::SymbolTable::Read , cmajor::symbols::SymbolTable::ReadSymbolDefinitionMap , cmajor::symbols::SystemModuleVersionTagVerifier::VerifyModuleVersionTag , cmajor::symbols::TemplateParameterSymbol::Read , cmajor::symbols::TypeSymbol::Read , cmajor::symbols::TypedefSymbol::Read , cmajor::symbols::UnderlyingTypeToEnumTypeConversion::Read , cmajor::symbols::VariableSymbol::Read


GetModule Member Function

Module * cmajor::symbols::SymbolReader::GetModule() const

Definition at line 42 of SymbolReader.hpp :
42 { return module; }


GetSymbolTable Member Function

SymbolTable * cmajor::symbols::SymbolReader::GetSymbolTable() const

Definition at line 40 of SymbolReader.hpp :
40 { return symbolTable; }

Called by: cmajor::symbols::ArrayBeginFunction::Read , cmajor::symbols::ArrayCBeginFunction::Read , cmajor::symbols::ArrayCEndFunction::Read , cmajor::symbols::ArrayEndFunction::Read , cmajor::symbols::ArrayLengthFunction::Read , cmajor::symbols::ArrayTypeSymbol::Read , cmajor::symbols::BasicTypeConversion::Read , cmajor::symbols::BasicTypeSymbol::Read , cmajor::symbols::BoundTemplateParameterSymbol::Read , cmajor::symbols::ClassDelegateTypeDefaultConstructor::Read , cmajor::symbols::ClassDelegateTypeSymbol::Read , cmajor::symbols::ClassTemplateSpecializationSymbol::Read , cmajor::symbols::ClassTypeSymbol::Read , cmajor::symbols::ConceptSymbol::Read , cmajor::symbols::ConstantSymbol::Read , cmajor::symbols::DelegateTypeDefaultConstructor::Read , cmajor::symbols::DelegateTypeSymbol::Read , cmajor::symbols::DerivedTypeSymbol::Read , cmajor::symbols::EnumTypeCopyAssignment::Read , cmajor::symbols::EnumTypeCopyConstructor::Read , cmajor::symbols::EnumTypeDefaultConstructor::Read , cmajor::symbols::EnumTypeEqualityOp::Read , cmajor::symbols::EnumTypeMoveAssignment::Read , cmajor::symbols::EnumTypeMoveConstructor::Read , cmajor::symbols::EnumTypeReturn::Read , cmajor::symbols::EnumTypeSymbol::Read , cmajor::symbols::EnumTypeToUnderlyingTypeConversion::Read , cmajor::symbols::FunctionSymbol::Read , cmajor::symbols::TemplateParameterSymbol::Read , cmajor::symbols::TypeSymbol::Read , cmajor::symbols::TypedefSymbol::Read , cmajor::symbols::UnderlyingTypeToEnumTypeConversion::Read , cmajor::symbols::VariableSymbol::Read


ReadArrayTypeSymbol Member Function

ArrayTypeSymbol * cmajor::symbols::SymbolReader::ReadArrayTypeSymbol(Symbol * parent)

Definition at line 34 of SymbolReader.cpp
Declaration at line 35 of SymbolReader.hpp

Calls: cmajor::symbols::Symbol::GetSymbolType , cmajor::symbols::SymbolReader::ReadSymbol

Called by: cmajor::symbols::SymbolTable::Read


ReadClassTemplateSpecializationSymbol Member Function

ClassTemplateSpecializationSymbol * cmajor::symbols::SymbolReader::ReadClassTemplateSpecializationSymbol(Symbol * parent)

Definition at line 60 of SymbolReader.cpp
Declaration at line 37 of SymbolReader.hpp

Calls: cmajor::symbols::Symbol::GetSymbolType , cmajor::symbols::SymbolReader::ReadSymbol

Called by: cmajor::symbols::SymbolTable::Read


ReadDerivedTypeSymbol Member Function

DerivedTypeSymbol * cmajor::symbols::SymbolReader::ReadDerivedTypeSymbol(Symbol * parent)

Definition at line 47 of SymbolReader.cpp
Declaration at line 36 of SymbolReader.hpp

Calls: cmajor::symbols::Symbol::GetSymbolType , cmajor::symbols::SymbolReader::ReadSymbol

Called by: cmajor::symbols::SymbolTable::Read


ReadParameterSymbol Member Function

ParameterSymbol * cmajor::symbols::SymbolReader::ReadParameterSymbol(Symbol * parent)

Definition at line 73 of SymbolReader.cpp
Declaration at line 38 of SymbolReader.hpp

Calls: cmajor::symbols::Symbol::GetSymbolType , cmajor::symbols::SymbolReader::ReadSymbol

Called by: cmajor::symbols::DelegateTypeSymbol::Read , cmajor::symbols::FunctionSymbol::Read


ReadSymbol Member Function

Symbol * cmajor::symbols::SymbolReader::ReadSymbol(Symbol * parent)

Definition at line 20 of SymbolReader.cpp
Declaration at line 34 of SymbolReader.hpp

Calls: cmajor::symbols::Symbol::Read , cmajor::symbols::Symbol::SetModule , cmajor::symbols::Symbol::SetParent , cmajor::symbols::SymbolFactory::CreateSymbol , cmajor::symbols::SymbolFactory::Instance , cmajor::symbols::SymbolReader::GetBinaryReader , sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadSpan , soulng::util::BinaryReader::ReadByte , soulng::util::BinaryReader::ReadUtf32String

Called by: cmajor::symbols::ContainerSymbol::Read , cmajor::symbols::SymbolReader::ReadArrayTypeSymbol , cmajor::symbols::SymbolReader::ReadClassTemplateSpecializationSymbol , cmajor::symbols::SymbolReader::ReadDerivedTypeSymbol , cmajor::symbols::SymbolReader::ReadParameterSymbol


RootModuleId Member Function

Module * cmajor::symbols::SymbolReader::RootModuleId() const

Definition at line 58 of SymbolReader.hpp :
58 { return rootModule; }


SetArrayTypesTarget Member Function

void cmajor::symbols::SymbolReader::SetArrayTypesTarget(std::vector<ArrayTypeSymbol *>* arrayTypesTarget)

Definition at line 44 of SymbolReader.hpp :
44 { arrayTypes = arrayTypesTarget; }


SetClassTemplateSpecializationTarget Member Function

void cmajor::symbols::SymbolReader::SetClassTemplateSpecializationTarget(std::vector<ClassTemplateSpecializationSymbol *>* classTemplateSpecializationTarget)

Definition at line 46 of SymbolReader.hpp :
46 { classTemplateSpecializations = classTemplateSpecializationTarget;  }


SetConversionsTarget Member Function

void cmajor::symbols::SymbolReader::SetConversionsTarget(std::vector<FunctionSymbol *>* conversionsTarget)

Definition at line 43 of SymbolReader.hpp :
43 { conversions = conversionsTarget; }


SetDerivedTypesTarget Member Function

void cmajor::symbols::SymbolReader::SetDerivedTypesTarget(std::vector<DerivedTypeSymbol *>* derivedTypesTarget)

Definition at line 45 of SymbolReader.hpp :
45 { derivedTypes = derivedTypesTarget; }


SetFunctionRequestTarget Member Function

void cmajor::symbols::SymbolReader::SetFunctionRequestTarget(std::vector<FunctionRequest >* functionRequestTarget)

Definition at line 48 of SymbolReader.hpp :
48 { functionRequests = functionRequestTarget; }


SetModule Member Function

void cmajor::symbols::SymbolReader::SetModule(Module * module_)

Definition at line 41 of SymbolReader.hpp :
41 { module = module_; }


SetProjectBit Member Function

bool cmajor::symbols::SymbolReader::SetProjectBit() const

Definition at line 55 of SymbolReader.hpp :
55 { return setProjectBit; }

Called by: cmajor::symbols::Symbol::Read


SetProjectBitForSymbols Member Function

void cmajor::symbols::SymbolReader::SetProjectBitForSymbols()

Definition at line 56 of SymbolReader.hpp :
56 { setProjectBit = true; }


SetRootModule Member Function

void cmajor::symbols::SymbolReader::SetRootModule(Module * rootModule_)

Definition at line 57 of SymbolReader.hpp :
57 { rootModule = rootModule_; }


SetSymbolTable Member Function

void cmajor::symbols::SymbolReader::SetSymbolTable(SymbolTable * symbolTable_)

Definition at line 39 of SymbolReader.hpp :
39 { symbolTable = symbolTable_; }

Called by: cmajor::symbols::SymbolTable::Read


SetTypeAndConceptRequestTarget Member Function

void cmajor::symbols::SymbolReader::SetTypeAndConceptRequestTarget(std::vector<TypeOrConceptRequest >* typeAndConceptRequestTarget)

Definition at line 47 of SymbolReader.hpp :
47 { typeAndConceptRequests = typeAndConceptRequestTarget; }


top | up | prev | next