top | up | prev | next

ParenthesizedConstraintNode Class

Definition at line 21 of Concept.hpp

Constructors

ParenthesizedConstraintNode(const Span& span_)
ParenthesizedConstraintNode(const Span& span_, ConstraintNode* constraint_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const ConstraintNode* Constraint() const
ConstraintNode* Constraint()
void Read(AstReader& reader) override
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<ConstraintNode> constraint

Constructor Details

ParenthesizedConstraintNode Constructor

sngcm::ast::ParenthesizedConstraintNode::ParenthesizedConstraintNode(const Span& span_)

Definition at line 19 of Concept.cpp :
  19 : ConstraintNode(NodeType::parenthesizedConstraintNodespan_)
  20 {
  21 }


Declaration at line 24 of Concept.hpp


ParenthesizedConstraintNode Constructor

sngcm::ast::ParenthesizedConstraintNode::ParenthesizedConstraintNode(const Span& span_, ConstraintNode * constraint_)

Definition at line 23 of Concept.cpp :
  23 : ConstraintNode(NodeType::parenthesizedConstraintNodespan_)constraint(constraint_)
  24 {
  25 }


Declaration at line 25 of Concept.hpp


Member Function Details

Accept Member Function

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

Definition at line 32 of Concept.cpp :
  33 {
  34     visitor.Visit(*this);
  35 }


Declaration at line 27 of Concept.hpp

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

Calls: sngcm::ast::Visitor::Visit


Clone Member Function

Node * sngcm::ast::ParenthesizedConstraintNode::Clone(CloneContext & cloneContext) const override

Definition at line 27 of Concept.cpp :
  28 {
  29     return new ParenthesizedConstraintNode(GetSpan()static_cast<ConstraintNode*>(constraint->Clone(cloneContext)));
  30 }


Declaration at line 26 of Concept.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::ParenthesizedConstraintNode::Clone

Called by: sngcm::ast::ParenthesizedConstraintNode::Clone


Constraint Member Function

const ConstraintNode * sngcm::ast::ParenthesizedConstraintNode::Constraint() const

Definition at line 30 of Concept.hpp :
 30 { return constraint.get(); }


Constraint Member Function

ConstraintNode * sngcm::ast::ParenthesizedConstraintNode::Constraint()

Definition at line 31 of Concept.hpp :
 31 { return constraint.get(); }

Called by: sngcm::ast::SourceWriter::Visit


Read Member Function

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

Definition at line 43 of Concept.cpp :
  44 {
  45     ConstraintNode::Read(reader);
  46     constraint.reset(reader.ReadConstraintNode());
  47 }


Declaration at line 29 of Concept.hpp

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

Calls: sngcm::ast::AstReader::ReadConstraintNode , sngcm::ast::Node::Read


ToString Member Function

std::string sngcm::ast::ParenthesizedConstraintNode::ToString() const override

Definition at line 49 of Concept.cpp :
  50 {
  51     return "(" + constraint->ToString() + ")";
  52 }


Declaration at line 32 of Concept.hpp

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

Calls: sngcm::ast::ParenthesizedConstraintNode::ToString

Called by: sngcm::ast::ParenthesizedConstraintNode::ToString


Write Member Function

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

Definition at line 37 of Concept.cpp :
  38 {
  39     ConstraintNode::Write(writer);
  40     writer.Write(constraint.get());
  41 }


Declaration at line 28 of Concept.hpp

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

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


top | up | prev | next