top | up | prev | next

BoundSwitchStatement Class

Definition at line 175 of BoundStatement.hpp

Constructors

BoundSwitchStatement(const Span& span_, const boost::uuids::uuid& moduleId_, std::unique_ptr<BoundExpression>&& condition_)

Member Functions

void Accept(BoundNodeVisitor& visitor) override
void AddCaseStatement(std::unique_ptr<BoundCaseStatement>&& caseStatement)
const std::vector<std::unique_ptr<BoundCaseStatement>>& CaseStatements()
BoundExpression* Condition()
BoundDefaultStatement* DefaultStatement()
void SetDefaultStatement(std::unique_ptr<BoundDefaultStatement>&& defaultStatement_)

Member Variables

std::vector<std::unique_ptr<BoundCaseStatement>> caseStatements
std::unique_ptr<BoundExpression> condition
std::unique_ptr<BoundDefaultStatement> defaultStatement

Constructor Details

BoundSwitchStatement Constructor

cmajor::binder::BoundSwitchStatement::BoundSwitchStatement(const Span& span_, const boost::uuids::uuid& moduleId_, std::unique_ptr<BoundExpression >&& condition_)

Definition at line 146 of BoundStatement.cpp :
146 :
147 BoundStatement(span_moduleId_BoundNodeType::boundSwitchStatement)condition(std::move(condition_))
148 {
149 }


Declaration at line 178 of BoundStatement.hpp


Member Function Details

Accept Member Function

void cmajor::binder::BoundSwitchStatement::Accept(BoundNodeVisitor & visitor) override

Definition at line 163 of BoundStatement.cpp :
164 {
165     visitor.Visit(*this);
166 }


Declaration at line 184 of BoundStatement.hpp

Base class overridden functions: cmajor::binder::BoundNode::Accept

Calls: cmajor::binder::BoundNodeVisitor::Visit


AddCaseStatement Member Function

void cmajor::binder::BoundSwitchStatement::AddCaseStatement(std::unique_ptr<BoundCaseStatement >&& caseStatement)

Definition at line 151 of BoundStatement.cpp :
152 {
153     caseStatement->SetParent(this);
154     caseStatements.push_back(std::move(caseStatement));
155 }


Declaration at line 181 of BoundStatement.hpp

Calls: cmajor::binder::BoundStatement::SetParent


CaseStatements Member Function

const std::vector<std::unique_ptr<BoundCaseStatement >>& cmajor::binder::BoundSwitchStatement::CaseStatements()

Definition at line 180 of BoundStatement.hpp :
180 { return caseStatements; }

Called by: cmajor::binder::ControlFlowAnalyzer::Visit


Condition Member Function

BoundExpression * cmajor::binder::BoundSwitchStatement::Condition()

Definition at line 179 of BoundStatement.hpp :
179 { return condition.get(); }


DefaultStatement Member Function

BoundDefaultStatement * cmajor::binder::BoundSwitchStatement::DefaultStatement()

Definition at line 182 of BoundStatement.hpp :
182 { return defaultStatement.get(); }

Called by: cmajor::binder::ControlFlowAnalyzer::Visit


SetDefaultStatement Member Function

void cmajor::binder::BoundSwitchStatement::SetDefaultStatement(std::unique_ptr<BoundDefaultStatement >&& defaultStatement_)

Definition at line 157 of BoundStatement.cpp :
158 {
159     defaultStatement = std::move(defaultStatement_);
160     defaultStatement->SetParent(this);
161 }


Declaration at line 183 of BoundStatement.hpp

Calls: cmajor::binder::BoundStatement::SetParent


top | up | prev | next