top | up | prev | next

ClassNode Class

Definition at line 13 of Class.hpp

Constructors

ClassNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ClassNode(const Span& span_, const boost::uuids::uuid& moduleId_, Specifiers specifiers_, IdentifierNode* id_, AttributesNode* attributes_)

Member Functions

void Accept(Visitor& visitor) override
void AddBaseClassOrInterface(Node* baseClassOrInterface)
void AddMember(Node* member)
void AddTemplateParameter(TemplateParameterNode* templateParameter) override
void ArrangeMembers()
const NodeList<Node>& BaseClassOrInterfaces() const
const Span& BeginBraceSpan() const
const Span& ClassSpan() const
Node* Clone(CloneContext& cloneContext) const override
const Span& EndBraceSpan() const
AttributesNode* GetAttributes() const
Specifiers GetSpecifiers() const override
IdentifierNode* Id() const
const NodeList<Node>& Members() const
void Read(AstReader& reader) override
void SetBeginBraceSpan(const Span& beginBraceSpan_)
void SetClassSpan(const Span& classSpan_)
void SetConstraint(WhereConstraintNode* whereConstraint)
void SetEndBraceSpan(const Span& endBraceSpan_)
void SetSpecifierSpan(const Span& specifierSpan_)
void SetSpecifiers(Specifiers specifiers_)
const Span& SpecifierSpan() const
const NodeList<TemplateParameterNode>& TemplateParameters() const
const WhereConstraintNode* WhereConstraint() const
WhereConstraintNode* WhereConstraint()
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<AttributesNode> attributes
NodeList<Node> baseClassOrInterfaces
Span beginBraceSpan
Span classSpan
std::unique_ptr<WhereConstraintNode> constraint
Span endBraceSpan
std::unique_ptr<IdentifierNode> id
NodeList<Node> members
Span specifierSpan
Specifiers specifiers
NodeList<TemplateParameterNode> templateParameters

Constructor Details

ClassNode Constructor

sngcm::ast::ClassNode::ClassNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 12 of Class.cpp :
 12 :
 13 Node(NodeType::classNodespan_moduleId_)specifiers(Specifiers::none)id()templateParameters()baseClassOrInterfaces()members()
 14 {
 15 }


Declaration at line 16 of Class.hpp


ClassNode Constructor

sngcm::ast::ClassNode::ClassNode(const Span& span_, const boost::uuids::uuid& moduleId_, Specifiers specifiers_, IdentifierNode * id_, AttributesNode * attributes_)

Definition at line 17 of Class.cpp :
 17 :
 18 Node(NodeType::classNodespan_moduleId_)specifiers(specifiers_)id(id_)templateParameters()baseClassOrInterfaces()members()attributes(attributes_)
 19 {
 20 }


Declaration at line 17 of Class.hpp


Member Function Details

Accept Member Function

void sngcm::ast::ClassNode::Accept(Visitor & visitor) override

Definition at line 59 of Class.cpp :
 60 {
 61     visitor.Visit(*this);
 62 }


Declaration at line 19 of Class.hpp

Base class overridden functions: sngcm::ast::Node::Accept

Calls: sngcm::ast::Visitor::Visit


AddBaseClassOrInterface Member Function

void sngcm::ast::ClassNode::AddBaseClassOrInterface(Node * baseClassOrInterface)

Definition at line 114 of Class.cpp :
115 {
116     baseClassOrInterface->SetParent(this);
117     baseClassOrInterfaces.Add(baseClassOrInterface);
118 }


Declaration at line 26 of Class.hpp

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::ClassNode::Clone


AddMember Member Function

void sngcm::ast::ClassNode::AddMember(Node * member)

Definition at line 126 of Class.cpp :
127 {
128     member->SetParent(this);
129     members.Add(member);
130 }


Declaration at line 30 of Class.hpp

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::ClassNode::Clone , sngcm::ast::MergeVisitor::Visit


AddTemplateParameter Member Function

void sngcm::ast::ClassNode::AddTemplateParameter(TemplateParameterNode * templateParameter) override

Definition at line 108 of Class.cpp :
109 {
110     templateParameter->SetParent(this);
111     templateParameters.Add(templateParameter);
112 }


Declaration at line 22 of Class.hpp

Base class overridden functions: sngcm::ast::Node::AddTemplateParameter

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::ClassNode::Clone


ArrangeMembers Member Function

void sngcm::ast::ClassNode::ArrangeMembers()

Definition at line 132 of Class.cpp
Declaration at line 43 of Class.hpp

Calls: sngcm::ast::Node::GetNodeType , sngcm::ast::Node::GetSpecifiers , sngcm::ast::NodeList::Add , sngcm::ast::NodeList::Count , sngcm::ast::NodeList::Insert , sngcm::ast::NodeList::Release , sngcm::ast::NodeList::RemoveEmpty

Called by: sngcm::ast::ClassMemberArranger::Visit


BaseClassOrInterfaces Member Function

const NodeList <Node >& sngcm::ast::ClassNode::BaseClassOrInterfaces() const

Definition at line 32 of Class.hpp :
 32 { return baseClassOrInterfaces; }

Called by: sngcm::ast::SourceWriter::Visit


BeginBraceSpan Member Function

const Span& sngcm::ast::ClassNode::BeginBraceSpan() const

Definition at line 40 of Class.hpp :
 40 { return beginBraceSpan; }


ClassSpan Member Function

const Span& sngcm::ast::ClassNode::ClassSpan() const

Definition at line 38 of Class.hpp :
 38 { return classSpan; }


Clone Member Function

Node * sngcm::ast::ClassNode::Clone(CloneContext & cloneContext) const override

Definition at line 22 of Class.cpp
Declaration at line 18 of Class.hpp

Base class overridden functions: sngcm::ast::Node::Clone

Calls: sngcm::ast::ClassNode::AddBaseClassOrInterface , sngcm::ast::ClassNode::AddMember , sngcm::ast::ClassNode::AddTemplateParameter , sngcm::ast::ClassNode::Clone , sngcm::ast::ClassNode::SetBeginBraceSpan , sngcm::ast::ClassNode::SetClassSpan , sngcm::ast::ClassNode::SetConstraint , sngcm::ast::ClassNode::SetEndBraceSpan , sngcm::ast::ClassNode::SetSpecifierSpan , sngcm::ast::CloneContext::InstantiateClassNode , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ClassNode::Clone , sngcm::ast::MergeVisitor::Visit


EndBraceSpan Member Function

const Span& sngcm::ast::ClassNode::EndBraceSpan() const

Definition at line 42 of Class.hpp :
 42 { return endBraceSpan; }


GetAttributes Member Function

AttributesNode * sngcm::ast::ClassNode::GetAttributes() const

Definition at line 34 of Class.hpp :
 34 { return attributes.get(); }

Called by: sngcm::ast::SourceWriter::Visit


GetSpecifiers Member Function

Specifiers sngcm::ast::ClassNode::GetSpecifiers() const override

Definition at line 23 of Class.hpp :
 23 { return specifiers; }

Base class overridden functions: sngcm::ast::Node::GetSpecifiers

Called by: sngcm::ast::SourceWriter::Visit


Id Member Function

IdentifierNode * sngcm::ast::ClassNode::Id() const

Definition at line 25 of Class.hpp :
 25 { return id.get(); }

Called by: sngcm::ast::MergeVisitor::Visit , sngcm::ast::NodeSelectorVisitor::Visit , sngcm::ast::SourceWriter::Visit


Members Member Function

const NodeList <Node >& sngcm::ast::ClassNode::Members() const

Definition at line 33 of Class.hpp :
 33 { return members; }

Called by: sngcm::ast::ClassMemberArranger::Visit , sngcm::ast::MergeVisitor::Visit , sngcm::ast::NodeSelectorVisitor::Visit , sngcm::ast::SourceWriter::Visit


Read Member Function

void sngcm::ast::ClassNode::Read(AstReader & reader) override

Definition at line 85 of Class.cpp
Declaration at line 21 of Class.hpp

Base class overridden functions: sngcm::ast::Node::Read

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadAttributesNode , sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::AstReader::ReadSpan , sngcm::ast::AstReader::ReadSpecifiers , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , soulng::util::BinaryReader::ReadBool


SetBeginBraceSpan Member Function

void sngcm::ast::ClassNode::SetBeginBraceSpan(const Span& beginBraceSpan_)

Definition at line 39 of Class.hpp :
 39 { beginBraceSpan = beginBraceSpan_; }

Called by: sngcm::ast::ClassNode::Clone


SetClassSpan Member Function

void sngcm::ast::ClassNode::SetClassSpan(const Span& classSpan_)

Definition at line 37 of Class.hpp :
 37 { classSpan = classSpan_; }

Called by: sngcm::ast::ClassNode::Clone


SetConstraint Member Function

void sngcm::ast::ClassNode::SetConstraint(WhereConstraintNode * whereConstraint)

Definition at line 120 of Class.cpp :
121 {
122     constraint.reset(whereConstraint);
123     constraint->SetParent(this);
124 }


Declaration at line 29 of Class.hpp

Calls: sngcm::ast::Node::SetParent

Called by: sngcm::ast::ClassNode::Clone


SetEndBraceSpan Member Function

void sngcm::ast::ClassNode::SetEndBraceSpan(const Span& endBraceSpan_)

Definition at line 41 of Class.hpp :
 41 { endBraceSpan = endBraceSpan_; }

Called by: sngcm::ast::ClassNode::Clone


SetSpecifierSpan Member Function

void sngcm::ast::ClassNode::SetSpecifierSpan(const Span& specifierSpan_)

Definition at line 35 of Class.hpp :
 35 { specifierSpan = specifierSpan_; }

Called by: sngcm::ast::ClassNode::Clone


SetSpecifiers Member Function

void sngcm::ast::ClassNode::SetSpecifiers(Specifiers specifiers_)

Definition at line 24 of Class.hpp :
 24 { specifiers = specifiers_; }


SpecifierSpan Member Function

const Span& sngcm::ast::ClassNode::SpecifierSpan() const

Definition at line 36 of Class.hpp :
 36 { return specifierSpan; }


TemplateParameters Member Function

const NodeList <TemplateParameterNode >& sngcm::ast::ClassNode::TemplateParameters() const

Definition at line 31 of Class.hpp :
 31 { return templateParameters; }

Called by: sngcm::ast::SourceWriter::Visit


WhereConstraint Member Function

const WhereConstraintNode * sngcm::ast::ClassNode::WhereConstraint() const

Definition at line 27 of Class.hpp :
 27 { return constraint.get(); }


WhereConstraint Member Function

WhereConstraintNode * sngcm::ast::ClassNode::WhereConstraint()

Definition at line 28 of Class.hpp :
 28 { return constraint.get(); }

Called by: sngcm::ast::SourceWriter::Visit


Write Member Function

void sngcm::ast::ClassNode::Write(AstWriter & writer) override

Definition at line 64 of Class.cpp
Declaration at line 20 of Class.hpp

Base class overridden functions: sngcm::ast::Node::Write

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::AstWriter::SpanConversionModuleId , sngcm::ast::AstWriter::Write , sngcm::ast::AstWriter::Write , sngcm::ast::Node::ModuleId , sngcm::ast::Node::Write , sngcm::ast::NodeList::Write , soulng::util::BinaryWriter::Write


top | up | prev | next