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