top | up | prev | next

AstReader Class

Definition at line 34 of AstReader.hpp

Constructors

AstReader(const std::string& fileName_)

Member Functions

BinaryReader& GetBinaryReader()
AttributeNode* ReadAttributeNode()
AttributesNode* ReadAttributesNode()
CompoundStatementNode* ReadCompoundStatementNode()
ConceptIdNode* ReadConceptIdNode()
ConceptNode* ReadConceptNode()
ConditionalCompilationExpressionNode* ReadConditionalCompilationExpressionNode()
ConditionalCompilationPartNode* ReadConditionalCompilationPartNode()
ConstraintNode* ReadConstraintNode()
DefaultStatementNode* ReadDefaultStatementNode()
IdentifierNode* ReadIdentifierNode()
LabelNode* ReadLabelNode()
Node* ReadNode()
Span ReadSpan()
Specifiers ReadSpecifiers()
StatementNode* ReadStatementNode()
TemplateIdNode* ReadTemplateIdNode()
WhereConstraintNode* ReadWhereConstraintNode()
void SetModuleMaps(const boost::uuids::uuid& rootModuleId_, std::unordered_map<int16_t, std::string>* moduleNameTable_, std::unordered_map<std::string, int16_t>* moduleIdMap_)

Member Variables

BinaryReader binaryReader
std::unordered_map<std::string, int16_t>* moduleIdMap
std::unordered_map<int16_t, std::string>* moduleNameTable
boost::uuids::uuid rootModuleId

Constructor Details

AstReader Constructor

sngcm::ast::AstReader::AstReader(const std::string& fileName_)

Definition at line 16 of AstReader.cpp :
 16 :
 17 binaryReader(fileName_)rootModuleId(boost::uuids::nil_uuid())moduleNameTable(nullptr)moduleIdMap(nullptr)
 18 {
 19 }


Declaration at line 37 of AstReader.hpp


Member Function Details

GetBinaryReader Member Function

BinaryReader & sngcm::ast::AstReader::GetBinaryReader()

Definition at line 38 of AstReader.hpp :
38 { return binaryReader; }

Called by: sngcm::ast::ArrayNode::Read , sngcm::ast::AstReader::ReadNode , sngcm::ast::AttributeNode::Read , sngcm::ast::AttributesNode::Read , sngcm::ast::AxiomStatementNode::Read , sngcm::ast::BooleanLiteralNode::Read , sngcm::ast::ByteLiteralNode::Read , sngcm::ast::CaseStatementNode::Read , sngcm::ast::CatchNode::Read , sngcm::ast::CharLiteralNode::Read , sngcm::ast::ClassNode::Read , sngcm::ast::CommentNode::Read , sngcm::ast::ConceptNode::Read , sngcm::ast::ConditionalCompilationPartNode::Read , sngcm::ast::ConditionalCompilationPrimaryNode::Read , sngcm::ast::ConditionalCompilationStatementNode::Read , sngcm::ast::ConstantNode::Read , sngcm::ast::ConstructionStatementNode::Read , sngcm::ast::DoubleLiteralNode::Read , sngcm::ast::EnumConstantNode::Read , sngcm::ast::EnumTypeNode::Read , sngcm::ast::FloatLiteralNode::Read , sngcm::ast::ForStatementNode::Read , sngcm::ast::FunctionConstraintNode::Read , sngcm::ast::FunctionNode::Read , sngcm::ast::GlobalVariableNode::Read , sngcm::ast::GotoStatementNode::Read , sngcm::ast::IdentifierNode::Read , sngcm::ast::IfStatementNode::Read , sngcm::ast::IntLiteralNode::Read , sngcm::ast::InterfaceNode::Read , sngcm::ast::LabelNode::Read , sngcm::ast::LiteralNode::Read , sngcm::ast::LongLiteralNode::Read , sngcm::ast::MemberFunctionConstraintNode::Read , sngcm::ast::MemberVariableNode::Read , sngcm::ast::NamespaceNode::Read , sngcm::ast::NodeList::Read , sngcm::ast::ParameterNode::Read , sngcm::ast::ReturnStatementNode::Read , sngcm::ast::SByteLiteralNode::Read , sngcm::ast::ShortLiteralNode::Read , sngcm::ast::StringLiteralNode::Read , sngcm::ast::SwitchStatementNode::Read , sngcm::ast::TemplateParameterNode::Read , sngcm::ast::ThrowStatementNode::Read , sngcm::ast::TypeNameNode::Read , sngcm::ast::UCharLiteralNode::Read , sngcm::ast::UIntLiteralNode::Read , sngcm::ast::ULongLiteralNode::Read , sngcm::ast::UShortLiteralNode::Read , sngcm::ast::UStringLiteralNode::Read , sngcm::ast::UuidLiteralNode::Read , sngcm::ast::WCharLiteralNode::Read , sngcm::ast::WStringLiteralNode::Read , sngcm::ast::WhereConstraintNode::Read


ReadAttributeNode Member Function

AttributeNode * sngcm::ast::AstReader::ReadAttributeNode()

Definition at line 32 of AstReader.cpp
Declaration at line 40 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::AttributesNode::Read


ReadAttributesNode Member Function

AttributesNode * sngcm::ast::AstReader::ReadAttributesNode()

Definition at line 45 of AstReader.cpp
Declaration at line 41 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::ClassNode::Read , sngcm::ast::FunctionNode::Read , sngcm::ast::InterfaceNode::Read , sngcm::ast::MemberVariableNode::Read


ReadCompoundStatementNode Member Function

CompoundStatementNode * sngcm::ast::AstReader::ReadCompoundStatementNode()

Definition at line 110 of AstReader.cpp
Declaration at line 46 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::CatchNode::Read , sngcm::ast::FunctionNode::Read , sngcm::ast::TryStatementNode::Read


ReadConceptIdNode Member Function

ConceptIdNode * sngcm::ast::AstReader::ReadConceptIdNode()

Definition at line 149 of AstReader.cpp
Declaration at line 49 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::ConceptNode::Read


ReadConceptNode Member Function

ConceptNode * sngcm::ast::AstReader::ReadConceptNode()

Definition at line 162 of AstReader.cpp
Declaration at line 50 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::IsConceptNode


ReadConditionalCompilationExpressionNode Member Function

ConditionalCompilationExpressionNode * sngcm::ast::AstReader::ReadConditionalCompilationExpressionNode()

Definition at line 188 of AstReader.cpp
Declaration at line 52 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::IsConditionalCompilationExpressionNode

Called by: sngcm::ast::ConditionalCompilationBinaryExpressionNode::Read , sngcm::ast::ConditionalCompilationNotNode::Read , sngcm::ast::ConditionalCompilationPartNode::Read , sngcm::ast::ParenthesizedConditionalCompilationExpressionNode::Read


ReadConditionalCompilationPartNode Member Function

ConditionalCompilationPartNode * sngcm::ast::AstReader::ReadConditionalCompilationPartNode()

Definition at line 201 of AstReader.cpp
Declaration at line 53 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::ConditionalCompilationStatementNode::Read


ReadConstraintNode Member Function

ConstraintNode * sngcm::ast::AstReader::ReadConstraintNode()

Definition at line 123 of AstReader.cpp
Declaration at line 47 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::NodeIsConstraintNode

Called by: sngcm::ast::BinaryConstraintNode::Read , sngcm::ast::ParenthesizedConstraintNode::Read , sngcm::ast::WhereConstraintNode::Read


ReadDefaultStatementNode Member Function

DefaultStatementNode * sngcm::ast::AstReader::ReadDefaultStatementNode()

Definition at line 97 of AstReader.cpp
Declaration at line 45 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::SwitchStatementNode::Read


ReadIdentifierNode Member Function

IdentifierNode * sngcm::ast::AstReader::ReadIdentifierNode()

Definition at line 58 of AstReader.cpp
Declaration at line 42 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::AliasNode::Read , sngcm::ast::ArrowNode::Read , sngcm::ast::AxiomNode::Read , sngcm::ast::CatchNode::Read , sngcm::ast::ClassDelegateNode::Read , sngcm::ast::ClassNode::Read , sngcm::ast::ConceptIdNode::Read , sngcm::ast::ConceptNode::Read , sngcm::ast::ConstantNode::Read , sngcm::ast::ConstructionStatementNode::Read , sngcm::ast::ConstructorNode::Read , sngcm::ast::DelegateNode::Read , sngcm::ast::DestructorConstraintNode::Read , sngcm::ast::DestructorNode::Read , sngcm::ast::DotNode::Read , sngcm::ast::EnumConstantNode::Read , sngcm::ast::EnumTypeNode::Read , sngcm::ast::GlobalVariableNode::Read , sngcm::ast::InterfaceNode::Read , sngcm::ast::MemberFunctionConstraintNode::Read , sngcm::ast::MemberInitializerNode::Read , sngcm::ast::MemberVariableNode::Read , sngcm::ast::MultiParamConstraintNode::Read , sngcm::ast::NamespaceImportNode::Read , sngcm::ast::NamespaceNode::Read , sngcm::ast::ParameterNode::Read , sngcm::ast::RangeForStatementNode::Read , sngcm::ast::StaticConstructorNode::Read , sngcm::ast::TemplateParameterNode::Read , sngcm::ast::TypedefNode::Read


ReadLabelNode Member Function

LabelNode * sngcm::ast::AstReader::ReadLabelNode()

Definition at line 71 of AstReader.cpp
Declaration at line 43 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::LabeledStatementNode::Read


ReadNode Member Function

Node * sngcm::ast::AstReader::ReadNode()

Definition at line 21 of AstReader.cpp :
 22 {
 23     NodeType nodeType = static_cast<NodeType>(binaryReader.ReadByte());
 24     Span span = ReadSpan();
 25     boost::uuids::uuid moduleId;
 26     GetBinaryReader().ReadUuid(moduleId);
 27     Node* node = NodeFactory::Instance().CreateNode(nodeTypespanmoduleId);
 28     node->Read(*this);
 29     return node;
 30 }


Declaration at line 39 of AstReader.hpp

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadSpan , sngcm::ast::Node::Read , sngcm::ast::NodeFactory::CreateNode , sngcm::ast::NodeFactory::Instance , soulng::util::BinaryReader::ReadByte , soulng::util::BinaryReader::ReadUuid

Called by: sngcm::ast::ArrayNode::Read , sngcm::ast::AsNode::Read , sngcm::ast::AssertStatementNode::Read , sngcm::ast::AssignmentStatementNode::Read , sngcm::ast::AstReader::ReadAttributeNode , sngcm::ast::AstReader::ReadAttributesNode , sngcm::ast::AstReader::ReadCompoundStatementNode , sngcm::ast::AstReader::ReadConceptIdNode , sngcm::ast::AstReader::ReadConceptNode , sngcm::ast::AstReader::ReadConditionalCompilationExpressionNode , sngcm::ast::AstReader::ReadConditionalCompilationPartNode , sngcm::ast::AstReader::ReadConstraintNode , sngcm::ast::AstReader::ReadDefaultStatementNode , sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::AstReader::ReadLabelNode , sngcm::ast::AstReader::ReadStatementNode , sngcm::ast::AstReader::ReadTemplateIdNode , sngcm::ast::AstReader::ReadWhereConstraintNode , sngcm::ast::AxiomStatementNode::Read , sngcm::ast::BinaryNode::Read , sngcm::ast::CastNode::Read , sngcm::ast::CatchNode::Read , sngcm::ast::ClassDelegateNode::Read , sngcm::ast::ConstNode::Read , sngcm::ast::ConstantNode::Read , sngcm::ast::ConstructNode::Read , sngcm::ast::ConstructionStatementNode::Read , sngcm::ast::ConstructorConstraintNode::Read , sngcm::ast::DelegateNode::Read , sngcm::ast::DeleteStatementNode::Read , sngcm::ast::DestroyStatementNode::Read , sngcm::ast::DoStatementNode::Read , sngcm::ast::EnumConstantNode::Read , sngcm::ast::EnumTypeNode::Read , sngcm::ast::ExpressionStatementNode::Read , sngcm::ast::ForStatementNode::Read , sngcm::ast::FunctionConstraintNode::Read , sngcm::ast::FunctionNode::Read , sngcm::ast::GlobalVariableNode::Read , sngcm::ast::GotoCaseStatementNode::Read , sngcm::ast::IfStatementNode::Read , sngcm::ast::IndexingNode::Read , sngcm::ast::InvokeNode::Read , sngcm::ast::IsConstraintNode::Read , sngcm::ast::IsNode::Read , sngcm::ast::LValueRefNode::Read , sngcm::ast::MemberFunctionConstraintNode::Read , sngcm::ast::MemberVariableNode::Read , sngcm::ast::NewNode::Read , sngcm::ast::NodeList::Read , sngcm::ast::ParameterNode::Read , sngcm::ast::PointerNode::Read , sngcm::ast::PredicateConstraintNode::Read , sngcm::ast::RValueRefNode::Read , sngcm::ast::RangeForStatementNode::Read , sngcm::ast::ReturnStatementNode::Read , sngcm::ast::SizeOfNode::Read , sngcm::ast::SwitchStatementNode::Read , sngcm::ast::TemplateIdNode::Read , sngcm::ast::TemplateParameterNode::Read , sngcm::ast::ThrowStatementNode::Read , sngcm::ast::TypeIdNode::Read , sngcm::ast::TypeNameConstraintNode::Read , sngcm::ast::TypeNameNode::Read , sngcm::ast::TypedefNode::Read , sngcm::ast::UnaryNode::Read , sngcm::ast::WhileStatementNode::Read


ReadSpan Member Function

Span sngcm::ast::AstReader::ReadSpan()

Definition at line 219 of AstReader.cpp
Declaration at line 55 of AstReader.hpp

Calls: soulng::util::BinaryReader::ReadBool , soulng::util::BinaryReader::ReadULEB128UInt

Called by: sngcm::ast::AstReader::ReadNode , sngcm::ast::AxiomNode::Read , sngcm::ast::CaseStatementNode::Read , sngcm::ast::CatchNode::Read , sngcm::ast::ClassNode::Read , sngcm::ast::CompoundStatementNode::Read , sngcm::ast::ConceptNode::Read , sngcm::ast::ConditionalCompilationPartNode::Read , sngcm::ast::ConditionalCompilationStatementNode::Read , sngcm::ast::DoStatementNode::Read , sngcm::ast::EnumTypeNode::Read , sngcm::ast::ForStatementNode::Read , sngcm::ast::FunctionNode::Read , sngcm::ast::IfStatementNode::Read , sngcm::ast::InterfaceNode::Read , sngcm::ast::MemberVariableNode::Read , sngcm::ast::RangeForStatementNode::Read , sngcm::ast::SwitchStatementNode::Read , sngcm::ast::WhileStatementNode::Read


ReadSpecifiers Member Function

Specifiers sngcm::ast::AstReader::ReadSpecifiers()

Definition at line 214 of AstReader.cpp :
215 {
216     return static_cast<Specifiers>(binaryReader.ReadUInt());
217 }


Declaration at line 54 of AstReader.hpp

Calls: soulng::util::BinaryReader::ReadUInt

Called by: sngcm::ast::ClassDelegateNode::Read , sngcm::ast::ClassNode::Read , sngcm::ast::ConceptNode::Read , sngcm::ast::ConstantNode::Read , sngcm::ast::DelegateNode::Read , sngcm::ast::EnumTypeNode::Read , sngcm::ast::FunctionNode::Read , sngcm::ast::GlobalVariableNode::Read , sngcm::ast::MemberVariableNode::Read , sngcm::ast::TypedefNode::Read


ReadStatementNode Member Function

StatementNode * sngcm::ast::AstReader::ReadStatementNode()

Definition at line 84 of AstReader.cpp
Declaration at line 44 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::IsStatementNode

Called by: sngcm::ast::DoStatementNode::Read , sngcm::ast::ForStatementNode::Read , sngcm::ast::IfStatementNode::Read , sngcm::ast::LabeledStatementNode::Read , sngcm::ast::RangeForStatementNode::Read , sngcm::ast::WhileStatementNode::Read


ReadTemplateIdNode Member Function

TemplateIdNode * sngcm::ast::AstReader::ReadTemplateIdNode()

Definition at line 175 of AstReader.cpp
Declaration at line 51 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::FullInstantiationRequestNode::Read


ReadWhereConstraintNode Member Function

WhereConstraintNode * sngcm::ast::AstReader::ReadWhereConstraintNode()

Definition at line 136 of AstReader.cpp
Declaration at line 48 of AstReader.hpp

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::GetNodeType

Called by: sngcm::ast::FunctionNode::Read


SetModuleMaps Member Function

void sngcm::ast::AstReader::SetModuleMaps(const boost::uuids::uuid& rootModuleId_, std::unordered_map<int16_t, std::string>* moduleNameTable_, std::unordered_map<std::string, int16_t>* moduleIdMap_)

Definition at line 236 of AstReader.cpp :
237 {
238     rootModuleId = rootModuleId_;
239     moduleNameTable = moduleNameTable_;
240     moduleIdMap = moduleIdMap_;
241 }


Declaration at line 56 of AstReader.hpp


top | up | prev | next