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

Last change on this file since 4578 was 4541, checked in by cameron, 5 years ago

New carry data system -- first stage

File size: 940 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 <pablo/pabloAST.h>
11
12namespace pablo {
13
14class While : public Statement {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::While;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    virtual ~While() {
24    }
25    inline PabloAST * getCondition() const {
26        return getOperand(0);
27    }
28    inline PabloBlock & getBody() {
29        return mBody;
30    }
31    inline const PabloBlock & getBody() const {
32        return mBody;
33    }
34protected:
35    While(PabloAST * expr, PabloBlock &body, PabloBlock * parent);
36private:
37    PabloBlock &        mBody;
38};
39
40}
41
42#endif // PS_WHILE_H
43
44
Note: See TracBrowser for help on using the repository browser.