# Kinetis Bootloader Host: elftosb::IfStatementASTNode Class Reference

elftosb::IfStatementASTNode Class Reference
Inheritance diagram for elftosb::IfStatementASTNode:
[legend]
Collaboration diagram for elftosb::IfStatementASTNode:
[legend]

## Public Member Functions

| IfStatementASTNode (const IfStatementASTNode &other)
virtual ASTNode * | clone () const
| Returns an exact duplicate of this object.
void | setConditionExpr (ExprASTNode *expr)
ExprASTNode * | getConditionExpr ()
void | setIfStatements (ListASTNode *statements)
ListASTNode * | getIfStatements ()
void | setNextIf (IfStatementASTNode *nextIf)
IfStatementASTNode * | getNextIf ()
void | setElseStatements (ListASTNode *statements)
ListASTNode * | getElseStatements ()
Public Member Functions inherited from elftosb::StatementASTNode
| StatementASTNode (const StatementASTNode &other)
Public Member Functions inherited from elftosb::ASTNode
| ASTNode ()
| Default constructor.
| ASTNode (ASTNode *parent)
| Constructor taking a parent node.
| ASTNode (const ASTNode &other)
| Copy constructor.
virtual | ~ASTNode ()
| Destructor.
virtual std::string | nodeName () const
| Returns the name of the object's class.
virtual ASTNode * | getParent () const
virtual void | setParent (ASTNode *newParent)
virtual void | printTree () const
virtual void | printTree (int indent) const
virtual void | setLocation (token_loc_t &loc)
virtual void | setLocation (token_loc_t &first, token_loc_t &last)
virtual void | setLocation (ASTNode *loc)
virtual void | setLocation (ASTNode *first, ASTNode *last)
virtual token_loc_t & | getLocation ()
virtual const token_loc_t & | getLocation () const
virtual int | getFirstLine ()
virtual int | getLastLine ()

## Protected Attributes

smart_ptr< ExprASTNode > | m_conditionExpr
| Boolean expression.
smart_ptr< ListASTNode > | m_ifStatements
| List of "if" section statements.
smart_ptr< IfStatementASTNode > | m_nextIf
| Link to next "else if". If this is non-NULL then m_elseStatements must be NULL and vice-versa.
smart_ptr< ListASTNode > | m_elseStatements
| Statements for the "else" part of the statements.
Protected Attributes inherited from elftosb::ASTNode
ASTNode * | m_parent
| Pointer to parent node of this object. May be NULL.
token_loc_t | m_location
| Location of this node in the source file.

## Additional Inherited Members

Protected Member Functions inherited from elftosb::ASTNode
void | printIndent (int indent) const
| Prints indent number of spaces.

## Constructor & Destructor Documentation

IfStatementASTNode::IfStatementASTNode | ( | const IfStatementASTNode & | other | ) |

Warning
  Be careful; this method could enter an infinite loop if m_nextIf feeds back onto itself. m_nextIf must be NULL at some point down the next if list.

The documentation for this class was generated from the following files:

- ElftosbAST.h
- ElftosbAST.cpp