source: icGREP/icgrep-devel/icgrep/pablo/ps_while.h @ 4199

Last change on this file since 4199 was 4199, checked in by nmedfort, 5 years ago

First stage of refactoring PabloE classes.

File size: 845 bytes
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef PS_WHILE_H
8#define PS_WHILE_H
9
10#include "ps_pablos.h"
11#include <list>
12
13namespace pablo {
14
15class While : public PabloE {
16    typedef std::list<PabloE*> List;
17public:
18    While(PabloE* expr, List psl)
19    : PabloE(ClassTypeId::While)
20    , mExpr(expr)
21    , mPSList(psl)
22    {
23
24    }
25
26    virtual ~While() {
27        delete mExpr;
28        for (auto statement : mPSList) {
29            delete statement;
30        }
31    }
32
33    inline PabloE * getExpr() const {
34        return mExpr;
35    }
36
37    inline const List & getPSList() const {
38        return mPSList;
39    }
40private:
41    PabloE *    mExpr;
42    List        mPSList;
43};
44
45}
46
47#endif // PS_WHILE_H
48
49
Note: See TracBrowser for help on using the repository browser.