top | up | prev | next

SwitchStatementNode Class

Definition at line 398 of Statement.hpp

Constructors

SwitchStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)
SwitchStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* condition_)

Member Functions

void Accept(Visitor& visitor) override
void AddCase(CaseStatementNode* caseS)
const Span& BeginBraceSpan() const
const NodeList<CaseStatementNode>& Cases() const
Node* Clone(CloneContext& cloneContext) const override
const Node* Condition() const
Node* Condition()
const DefaultStatementNode* Default() const
DefaultStatementNode* Default()
const Span& EndBraceSpan() const
bool IsBreakEnclosingStatementNode() const override
const Span& LeftParenSpan() const
void Read(AstReader& reader) override
const Span& RightParenSpan() const
void SetBeginBraceSpan(const Span& beginBraceSpan_)
void SetDefault(DefaultStatementNode* defaultS_)
void SetEndBraceSpan(const Span& endBraceSpan_)
void SetLeftParenSpan(const Span& leftParenSpan_)
void SetRightParenSpan(const Span& rightParenSpan_)
void Write(AstWriter& writer) override

Member Variables

Span beginBraceSpan
NodeList<CaseStatementNode> cases
std::unique_ptr<Node> condition
std::unique_ptr<DefaultStatementNode> defaultS
Span endBraceSpan
Span leftParenSpan
Span rightParenSpan

Constructor Details

SwitchStatementNode Constructor

sngcm::ast::SwitchStatementNode::SwitchStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 802 of Statement.cpp :
 802 :
 803 StatementNode(NodeType::switchStatementNodespan_moduleId_)condition()cases()defaultS()
 804 {
 805 }


Declaration at line 401 of Statement.hpp


SwitchStatementNode Constructor

sngcm::ast::SwitchStatementNode::SwitchStatementNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node * condition_)

Definition at line 807 of Statement.cpp :
 807 :
 808 StatementNode(NodeType::switchStatementNodespan_moduleId_)condition(condition_)cases()defaultS()
 809 {
 810     condition->SetParent(this);
 811 }


Declaration at line 402 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 832 of Statement.cpp :
 833 {
 834     visitor.Visit(*this);
 835 }


Declaration at line 404 of Statement.hpp

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

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


AddCase Member Function

void sngcm::ast::SwitchStatementNode::AddCase(CaseStatementNode * caseS)

Definition at line 874 of Statement.cpp :
 875 {
 876     caseS->SetParent(this);
 877     cases.Add(caseS);
 878 }


Declaration at line 410 of Statement.hpp

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::SwitchStatementNode::Clone


BeginBraceSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::BeginBraceSpan() const

Definition at line 420 of Statement.hpp :
420 { return beginBraceSpan; }


Cases Member Function

const NodeList <CaseStatementNode >& sngcm::ast::SwitchStatementNode::Cases() const

Definition at line 411 of Statement.hpp :
411 { return cases; }

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


Clone Member Function

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

Definition at line 813 of Statement.cpp
Declaration at line 403 of Statement.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Count , sngcm::ast::SwitchStatementNode::AddCase , sngcm::ast::SwitchStatementNode::Clone , sngcm::ast::SwitchStatementNode::SetBeginBraceSpan , sngcm::ast::SwitchStatementNode::SetDefault , sngcm::ast::SwitchStatementNode::SetEndBraceSpan , sngcm::ast::SwitchStatementNode::SetLeftParenSpan , sngcm::ast::SwitchStatementNode::SetRightParenSpan

Called by: sngcm::ast::SwitchStatementNode::Clone


Condition Member Function

const Node * sngcm::ast::SwitchStatementNode::Condition() const

Definition at line 408 of Statement.hpp :
408 { return condition.get(); }


Condition Member Function

Node * sngcm::ast::SwitchStatementNode::Condition()

Definition at line 409 of Statement.hpp :
409 { return condition.get(); }

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


Default Member Function

const DefaultStatementNode * sngcm::ast::SwitchStatementNode::Default() const

Definition at line 413 of Statement.hpp :
413 { return defaultS.get(); }


Default Member Function

DefaultStatementNode * sngcm::ast::SwitchStatementNode::Default()

Definition at line 414 of Statement.hpp :
414 { return defaultS.get(); }

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


EndBraceSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::EndBraceSpan() const

Definition at line 422 of Statement.hpp :
422 { return endBraceSpan; }


IsBreakEnclosingStatementNode Member Function

bool sngcm::ast::SwitchStatementNode::IsBreakEnclosingStatementNode() const override

Definition at line 407 of Statement.hpp :
407 { return true; }

Base class overridden functions: sngcm::ast::StatementNode::IsBreakEnclosingStatementNode


LeftParenSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::LeftParenSpan() const

Definition at line 416 of Statement.hpp :
416 { return leftParenSpan; }


Read Member Function

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

Definition at line 855 of Statement.cpp
Declaration at line 406 of Statement.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadDefaultStatementNode , sngcm::ast::AstReader::ReadNode , sngcm::ast::AstReader::ReadSpan , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , sngcm::ast::StatementNode::Read , soulng::util::BinaryReader::ReadBool


RightParenSpan Member Function

const Span& sngcm::ast::SwitchStatementNode::RightParenSpan() const

Definition at line 418 of Statement.hpp :
418 { return rightParenSpan; }


SetBeginBraceSpan Member Function

void sngcm::ast::SwitchStatementNode::SetBeginBraceSpan(const Span& beginBraceSpan_)

Definition at line 419 of Statement.hpp :
419 { beginBraceSpan = beginBraceSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


SetDefault Member Function

void sngcm::ast::SwitchStatementNode::SetDefault(DefaultStatementNode * defaultS_)

Definition at line 880 of Statement.cpp :
 881 {
 882     defaultS.reset(defaultS_);
 883     defaultS->SetParent(this);
 884 }


Declaration at line 412 of Statement.hpp

Calls: sngcm::ast::Node::SetParent

Called by: sngcm::ast::SwitchStatementNode::Clone


SetEndBraceSpan Member Function

void sngcm::ast::SwitchStatementNode::SetEndBraceSpan(const Span& endBraceSpan_)

Definition at line 421 of Statement.hpp :
421 { endBraceSpan = endBraceSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


SetLeftParenSpan Member Function

void sngcm::ast::SwitchStatementNode::SetLeftParenSpan(const Span& leftParenSpan_)

Definition at line 415 of Statement.hpp :
415 { leftParenSpan = leftParenSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


SetRightParenSpan Member Function

void sngcm::ast::SwitchStatementNode::SetRightParenSpan(const Span& rightParenSpan_)

Definition at line 417 of Statement.hpp :
417 { rightParenSpan = rightParenSpan_; }

Called by: sngcm::ast::SwitchStatementNode::Clone


Write Member Function

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

Definition at line 837 of Statement.cpp
Declaration at line 405 of Statement.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::AstWriter::SpanConversionModuleId , sngcm::ast::AstWriter::Write , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Write , sngcm::ast::StatementNode::Write , soulng::util::BinaryWriter::Write


top | up | prev | next