Blang/src/lib/src/Statement/CompoundStatement.h

38 lines
953 B
C++

#ifndef COMPOUNDSTATEMENT_HPP
#define COMPOUNDSTATEMENT_HPP
#include <vector>
#include "../Statement.hpp"
class CompoundStatement : public Statement
{
public:
typedef std::vector<Statement*>::iterator body_iterator;
typedef std::vector<Statement*>::const_iterator const_body_iterator;
typedef std::vector<Statement*>::reverse_iterator reverse_body_iterator;
typedef std::vector<Statement*>::const_reverse_iterator const_reverse_body_iterator;
unsigned int size () const;
bool empty() const;
void setLastStatement(Statement *S);
const_body_iterator body_begin() const;
body_iterator body_begin();
const_body_iterator body_end() const;
body_iterator body_end();
const_reverse_body_iterator body_rbegin() const;
reverse_body_iterator body_rbegin();
const_reverse_body_iterator body_rend() const;
reverse_body_iterator body_rend();
private:
std::vector<Statement*> _body;
};
#endif