top | up | prev | next

ClassNode Class

Definition at line 13 of Class.hpp

Constructors

ClassNode(const Span& span_)
ClassNode(const Span& span_, Specifiers specifiers_, IdentifierNode* id_, Attributes* 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
Attributes* 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<Attributes> 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_)

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


Declaration at line 16 of Class.hpp


ClassNode Constructor

sngcm::ast::ClassNode::ClassNode(const Span& span_, Specifiers specifiers_, IdentifierNode * id_, Attributes * attributes_)

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


Declaration at line 17 of Class.hpp


Member Function Details

Accept Member Function

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

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


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 113 of Class.cpp :
114 {
115     baseClassOrInterface->SetParent(this);
116     baseClassOrInterfaces.Add(baseClassOrInterface);
117 }


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 125 of Class.cpp :
126 {
127     member->SetParent(this);
128     members.Add(member);
129 }


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 107 of Class.cpp :
108 {
109     templateParameter->SetParent(this);
110     templateParameters.Add(templateParameter);
111 }


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 131 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 21 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::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

Attributes * 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 83 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::ReadIdentifierNode , sngcm::ast::AstReader::ReadSpan , sngcm::ast::AstReader::ReadSpecifiers , sngcm::ast::ClassNode::Read , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , soulng::util::BinaryReader::ReadBool

Called by: sngcm::ast::ClassNode::Read


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 119 of Class.cpp :
120 {
121     constraint.reset(whereConstraint);
122     constraint->SetParent(this);
123 }


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 63 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::Write , sngcm::ast::AstWriter::Write , sngcm::ast::ClassNode::Write , sngcm::ast::Node::Write , sngcm::ast::NodeList::Write , soulng::util::BinaryWriter::Write

Called by: sngcm::ast::ClassNode::Write


top | up | prev | next