top | up | prev | next

BinaryNode Abstract Class

Definition at line 117 of Node.hpp

Constructors

BinaryNode(NodeType nodeType, const Span& span_, const boost::uuids::uuid& moduleId_)
BinaryNode(NodeType nodeType, const Span& span_, const boost::uuids::uuid& moduleId_, Node* left_, Node* right_)

Member Functions

const Node* Left() const
Node* Left()
void Read(AstReader& reader) override
const Node* Right() const
Node* Right()
void SetFullSpan() override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> left
std::unique_ptr<Node> right

Constructor Details

BinaryNode Constructor

sngcm::ast::BinaryNode::BinaryNode(NodeType nodeType, const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 127 of Node.cpp :
127 : Node(nodeTypespan_moduleId_)left()right()
128 {
129 }



BinaryNode Constructor

sngcm::ast::BinaryNode::BinaryNode(NodeType nodeType, const Span& span_, const boost::uuids::uuid& moduleId_, Node * left_, Node * right_)

Definition at line 131 of Node.cpp :
131 : Node(nodeTypespan_moduleId_)left(left_)right(right_)
132 {
133     left->SetParent(this);
134     right->SetParent(this);
135 }



Member Function Details

Left Member Function

const Node * sngcm::ast::BinaryNode::Left() const

Definition at line 125 of Node.hpp :
125 { return left.get(); }


Left Member Function

Node * sngcm::ast::BinaryNode::Left()

Definition at line 126 of Node.hpp :
126 { return left.get(); }

Called by: sngcm::ast::AddNode::Clone , sngcm::ast::AddNode::ToString , sngcm::ast::BitAndNode::Clone , sngcm::ast::BitAndNode::ToString , sngcm::ast::BitOrNode::Clone , sngcm::ast::BitOrNode::ToString , sngcm::ast::BitXorNode::Clone , sngcm::ast::BitXorNode::ToString , sngcm::ast::ConjunctionNode::Clone , sngcm::ast::ConjunctionNode::ToString , sngcm::ast::DisjunctionNode::Clone , sngcm::ast::DisjunctionNode::ToString , sngcm::ast::DivNode::Clone , sngcm::ast::DivNode::ToString , sngcm::ast::EqualNode::Clone , sngcm::ast::EqualNode::ToString , sngcm::ast::EquivalenceNode::Clone , sngcm::ast::EquivalenceNode::ToString , sngcm::ast::GreaterNode::Clone , sngcm::ast::GreaterNode::ToString , sngcm::ast::GreaterOrEqualNode::Clone , sngcm::ast::GreaterOrEqualNode::ToString , sngcm::ast::ImplicationNode::Clone , sngcm::ast::ImplicationNode::ToString , sngcm::ast::LessNode::Clone , sngcm::ast::LessNode::ToString , sngcm::ast::LessOrEqualNode::Clone , sngcm::ast::LessOrEqualNode::ToString , sngcm::ast::MulNode::Clone , sngcm::ast::MulNode::ToString , sngcm::ast::NotEqualNode::Clone , sngcm::ast::NotEqualNode::ToString , sngcm::ast::RemNode::Clone , sngcm::ast::RemNode::ToString , sngcm::ast::ShiftLeftNode::Clone , sngcm::ast::ShiftLeftNode::ToString , sngcm::ast::ShiftRightNode::Clone , sngcm::ast::ShiftRightNode::ToString , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SubNode::Clone , sngcm::ast::SubNode::ToString


Read Member Function

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

Definition at line 144 of Node.cpp :
145 {
146     Node::Read(reader);
147     left.reset(reader.ReadNode());
148     left->SetParent(this);
149     right.reset(reader.ReadNode());
150     right->SetParent(this);
151 }


Declaration at line 123 of Node.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent


Right Member Function

const Node * sngcm::ast::BinaryNode::Right() const

Definition at line 127 of Node.hpp :
127 { return right.get(); }


Right Member Function

Node * sngcm::ast::BinaryNode::Right()

Definition at line 128 of Node.hpp :
128 { return right.get(); }

Called by: sngcm::ast::AddNode::Clone , sngcm::ast::AddNode::ToString , sngcm::ast::BitAndNode::Clone , sngcm::ast::BitAndNode::ToString , sngcm::ast::BitOrNode::Clone , sngcm::ast::BitOrNode::ToString , sngcm::ast::BitXorNode::Clone , sngcm::ast::BitXorNode::ToString , sngcm::ast::ConjunctionNode::Clone , sngcm::ast::ConjunctionNode::ToString , sngcm::ast::DisjunctionNode::Clone , sngcm::ast::DisjunctionNode::ToString , sngcm::ast::DivNode::Clone , sngcm::ast::DivNode::ToString , sngcm::ast::EqualNode::Clone , sngcm::ast::EqualNode::ToString , sngcm::ast::EquivalenceNode::Clone , sngcm::ast::EquivalenceNode::ToString , sngcm::ast::GreaterNode::Clone , sngcm::ast::GreaterNode::ToString , sngcm::ast::GreaterOrEqualNode::Clone , sngcm::ast::GreaterOrEqualNode::ToString , sngcm::ast::ImplicationNode::Clone , sngcm::ast::ImplicationNode::ToString , sngcm::ast::LessNode::Clone , sngcm::ast::LessNode::ToString , sngcm::ast::LessOrEqualNode::Clone , sngcm::ast::LessOrEqualNode::ToString , sngcm::ast::MulNode::Clone , sngcm::ast::MulNode::ToString , sngcm::ast::NotEqualNode::Clone , sngcm::ast::NotEqualNode::ToString , sngcm::ast::RemNode::Clone , sngcm::ast::RemNode::ToString , sngcm::ast::ShiftLeftNode::Clone , sngcm::ast::ShiftLeftNode::ToString , sngcm::ast::ShiftRightNode::Clone , sngcm::ast::ShiftRightNode::ToString , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::SubNode::Clone , sngcm::ast::SubNode::ToString


SetFullSpan Member Function

void sngcm::ast::BinaryNode::SetFullSpan() override

Definition at line 153 of Node.cpp :
154 {
155     const Span& thisSpan = GetSpan();
156     left->SetFullSpan();
157     right->SetFullSpan();
158     const Span& leftSpan = left->GetSpan();
159     const Span& rightSpan = right->GetSpan();
160     SetSpanStart(std::min(thisSpan.startstd::min(leftSpan.startrightSpan.start)));
161     SetSpanEnd(std::max(thisSpan.endstd::max(leftSpan.endrightSpan.end)));
162 }


Declaration at line 124 of Node.hpp

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

Calls: sngcm::ast::BinaryNode::SetFullSpan , sngcm::ast::Node::GetSpan , sngcm::ast::Node::SetSpanEnd , sngcm::ast::Node::SetSpanStart

Called by: sngcm::ast::BinaryNode::SetFullSpan


Write Member Function

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

Definition at line 137 of Node.cpp :
138 {
139     Node::Write(writer);
140     writer.Write(left.get());
141     writer.Write(right.get());
142 }


Declaration at line 122 of Node.hpp

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

Calls: sngcm::ast::Node::Write


top | up | prev | next