top | up | prev | next

ArrayDeclaratorNode Class

Definition at line 26 of Declarator.hpp

Constructors

ArrayDeclaratorNode()
ArrayDeclaratorNode(const Span& span_, Node* declarator_, Node* size_)

Member Functions

void Accept(Visitor& visitor) override
Node* Declarator()
void Read(Reader& reader) override
Node* Size()
void Write(Writer& writer) override

Member Variables

std::unique_ptr<Node> declarator
std::unique_ptr<Node> size

Constructor Details

ArrayDeclaratorNode Constructor

sngcpp::ast::ArrayDeclaratorNode::ArrayDeclaratorNode()

Definition at line 39 of Declarator.cpp :
 39 : Node(NodeType::arrayDeclaratorNode)
 40 {
 41 }


Declaration at line 29 of Declarator.hpp


ArrayDeclaratorNode Constructor

sngcpp::ast::ArrayDeclaratorNode::ArrayDeclaratorNode(const Span& span_, Node * declarator_, Node * size_)

Definition at line 43 of Declarator.cpp :
 43 : Node(NodeType::arrayDeclaratorNodespan_)declarator(declarator_)size(size_)
 44 {
 45 }


Declaration at line 30 of Declarator.hpp


Member Function Details

Accept Member Function

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

Definition at line 47 of Declarator.cpp :
 48 {
 49     visitor.Visit(*this);
 50 }


Declaration at line 31 of Declarator.hpp

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

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


Declarator Member Function

Node * sngcpp::ast::ArrayDeclaratorNode::Declarator()

Definition at line 34 of Declarator.hpp :
 34 { return declarator.get(); }


Read Member Function

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

Definition at line 63 of Declarator.cpp :
 64 {
 65     Node::Read(reader);
 66     declarator.reset(reader.ReadNode());
 67     bool hasSize = reader.GetBinaryReader().ReadBool();
 68     if (hasSize)
 69     {
 70         size.reset(reader.ReadNode());
 71     }
 72 }


Declaration at line 33 of Declarator.hpp

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

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


Size Member Function

Node * sngcpp::ast::ArrayDeclaratorNode::Size()

Definition at line 35 of Declarator.hpp :
 35 { return size.get(); }


Write Member Function

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

Definition at line 52 of Declarator.cpp :
 53 {
 54     Node::Write(writer);
 55     declarator->Write(writer);
 56     writer.GetBinaryWriter().Write(size != nullptr);
 57     if (size)
 58     {
 59         size->Write(writer);
 60     }
 61 }


Declaration at line 32 of Declarator.hpp

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

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

Called by: sngcpp::ast::ArrayDeclaratorNode::Write


top | up | prev | next