top | up | prev | next

FunctionDeclaratorNode Class

Definition at line 41 of Declarator.hpp

Constructors

FunctionDeclaratorNode()
FunctionDeclaratorNode(const Span& span_, Node* declarator_, Node* parameters_, Specifier cvSpecifiers_)

Member Functions

void Accept(Visitor& visitor) override
Specifier CVSpecifiers() const
Node* Declarator()
bool IsFunctionDeclaratorNode() const override
Node* Parameters()
void Read(Reader& reader) override
void Write(Writer& writer) override

Member Variables

Specifier cvSpecifiers
std::unique_ptr<Node> declarator
std::unique_ptr<Node> parameters

Constructor Details

FunctionDeclaratorNode Constructor

sngcpp::ast::FunctionDeclaratorNode::FunctionDeclaratorNode()

Definition at line 74 of Declarator.cpp :
 74 : Node(NodeType::functionDeclaratorNode)
 75 {
 76 }


Declaration at line 44 of Declarator.hpp


FunctionDeclaratorNode Constructor

sngcpp::ast::FunctionDeclaratorNode::FunctionDeclaratorNode(const Span& span_, Node * declarator_, Node * parameters_, Specifier cvSpecifiers_)

Definition at line 78 of Declarator.cpp :
 78 :
 79 Node(NodeType::functionDeclaratorNodespan_)declarator(declarator_)parameters(parameters_)cvSpecifiers(cvSpecifiers_)
 80 {
 81 }


Declaration at line 45 of Declarator.hpp


Member Function Details

Accept Member Function

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

Definition at line 83 of Declarator.cpp :
 84 {
 85     visitor.Visit(*this);
 86 }


Declaration at line 46 of Declarator.hpp

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

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


CVSpecifiers Member Function

Specifier sngcpp::ast::FunctionDeclaratorNode::CVSpecifiers() const

Definition at line 52 of Declarator.hpp :
 52 { return cvSpecifiers; }


Declarator Member Function

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

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


IsFunctionDeclaratorNode Member Function

bool sngcpp::ast::FunctionDeclaratorNode::IsFunctionDeclaratorNode() const override

Definition at line 49 of Declarator.hpp :
 49 { return true; }

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


Parameters Member Function

Node * sngcpp::ast::FunctionDeclaratorNode::Parameters()

Definition at line 51 of Declarator.hpp :
 51 { return parameters.get(); }


Read Member Function

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

Definition at line 100 of Declarator.cpp :
101 {
102     Node::Read(reader);
103     declarator.reset(reader.ReadNode());
104     bool hasParameters = reader.GetBinaryReader().ReadBool();
105     if (hasParameters)
106     {
107         parameters.reset(reader.ReadNode());
108     }
109     cvSpecifiers = reader.ReadSpecifiers();
110 }


Declaration at line 48 of Declarator.hpp

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

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


Write Member Function

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

Definition at line 88 of Declarator.cpp :
 89 {
 90     Node::Write(writer);
 91     declarator->Write(writer);
 92     writer.GetBinaryWriter().Write(parameters != nullptr);
 93     if (parameters)
 94     {
 95         parameters->Write(writer);
 96     }
 97     writer.Write(cvSpecifiers);
 98 }


Declaration at line 47 of Declarator.hpp

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

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

Called by: sngcpp::ast::FunctionDeclaratorNode::Write


top | up | prev | next