top | up | prev | next

ClassNode Class

Definition at line 73 of Class.hpp

Constructors

ClassNode()
ClassNode(const Span& span_, ClassKey classKey_, Node* className_, Specifier classVirtSpecifiers_, Node* baseClasses_)

Member Functions

void Accept(Visitor& visitor) override
void AddDeclaration(const Span& span, Node* declaration)
Node* BaseClasses()
Node* ClassName()
Specifier ClassVirtSpecifiers() const
const Span& CloseBraceSpan() const
Node* Declarations()
Specifier DefaultAccess() const
ClassKey GetClassKey() const
const Span& OpenBraceSpan() const
void Read(Reader& reader) override
void SetCloseBraceSpan(const Span& closeBraceSpan_)
void SetOpenBraceSpan(const Span& openBraceSpan_)
void Write(Writer& writer) override

Member Variables

std::unique_ptr<Node> baseClasses
ClassKey classKey
std::unique_ptr<Node> className
Specifier classVirtSpecifiers
Span closeBraceSpan
std::unique_ptr<Node> declarations
Span openBraceSpan

Constructor Details

ClassNode Constructor

sngcpp::ast::ClassNode::ClassNode()

Definition at line 121 of Class.cpp :
121 : Node(NodeType::classNode)classKey()classVirtSpecifiers()
122 {
123 }


Declaration at line 76 of Class.hpp


ClassNode Constructor

sngcpp::ast::ClassNode::ClassNode(const Span& span_, ClassKey classKey_, Node * className_, Specifier classVirtSpecifiers_, Node * baseClasses_)

Definition at line 125 of Class.cpp :
125 :
126 Node(NodeType::classNodespan_)classKey(classKey_)className(className_)classVirtSpecifiers(classVirtSpecifiers_)baseClasses(baseClasses_)
127 {
128 }


Declaration at line 77 of Class.hpp


Member Function Details

Accept Member Function

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

Definition at line 130 of Class.cpp :
131 {
132     visitor.Visit(*this);
133 }


Declaration at line 78 of Class.hpp

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

Calls: sngcpp::ast::Visitor::Visit


AddDeclaration Member Function

void sngcpp::ast::ClassNode::AddDeclaration(const Span& span, Node * declaration)

Definition at line 187 of Class.cpp :
188 {
189     if (declarations)
190     {
191         declarations.reset(new DeclarationSequenceNode(spandeclarations.release()declaration));
192     }
193     else
194     {
195         declarations.reset(declaration);
196     }
197 }


Declaration at line 81 of Class.hpp


BaseClasses Member Function

Node * sngcpp::ast::ClassNode::BaseClasses()

Definition at line 85 of Class.hpp :
 85 { return baseClasses.get(); }


ClassName Member Function

Node * sngcpp::ast::ClassNode::ClassName()

Definition at line 82 of Class.hpp :
 82 { return className.get(); }


ClassVirtSpecifiers Member Function

Specifier sngcpp::ast::ClassNode::ClassVirtSpecifiers() const

Definition at line 84 of Class.hpp :
 84 { return classVirtSpecifiers; }


CloseBraceSpan Member Function

const Span& sngcpp::ast::ClassNode::CloseBraceSpan() const

Definition at line 91 of Class.hpp :
 91 { return closeBraceSpan; }


Declarations Member Function

Node * sngcpp::ast::ClassNode::Declarations()

Definition at line 86 of Class.hpp :
 86 { return declarations.get(); }


DefaultAccess Member Function

Specifier sngcpp::ast::ClassNode::DefaultAccess() const

Definition at line 175 of Class.cpp :
176 {
177     if (classKey == ClassKey::class_)
178     {
179         return Specifier::private_;
180     }
181     else
182     {
183         return Specifier::public_;
184     }
185 }


Declaration at line 87 of Class.hpp


GetClassKey Member Function

ClassKey sngcpp::ast::ClassNode::GetClassKey() const

Definition at line 83 of Class.hpp :
 83 { return classKey; }


OpenBraceSpan Member Function

const Span& sngcpp::ast::ClassNode::OpenBraceSpan() const

Definition at line 90 of Class.hpp :
 90 { return openBraceSpan; }


Read Member Function

void sngcpp::ast::ClassNode::Read(Reader & reader) override

Definition at line 155 of Class.cpp
Declaration at line 80 of Class.hpp

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

Calls: sngcpp::ast::Node::Read , sngcpp::ast::Reader::GetBinaryReader , sngcpp::ast::Reader::Read , sngcpp::ast::Reader::ReadClassKey , sngcpp::ast::Reader::ReadNode , sngcpp::ast::Reader::ReadSpecifiers


SetCloseBraceSpan Member Function

void sngcpp::ast::ClassNode::SetCloseBraceSpan(const Span& closeBraceSpan_)

Definition at line 89 of Class.hpp :
 89 { closeBraceSpan = closeBraceSpan_; }


SetOpenBraceSpan Member Function

void sngcpp::ast::ClassNode::SetOpenBraceSpan(const Span& openBraceSpan_)

Definition at line 88 of Class.hpp :
 88 { openBraceSpan = openBraceSpan_; }


Write Member Function

void sngcpp::ast::ClassNode::Write(Writer & writer) override

Definition at line 135 of Class.cpp
Declaration at line 79 of Class.hpp

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

Calls: sngcpp::ast::ClassNode::Write , sngcpp::ast::Node::Write , sngcpp::ast::Writer::GetBinaryWriter , sngcpp::ast::Writer::Write , sngcpp::ast::Writer::Write , sngcpp::ast::Writer::Write

Called by: sngcpp::ast::ClassNode::Write


top | up | prev | next