![]() |
libsesstype
2.0.0
Library for Session Types programming.
|
00001 #ifndef SESSTYPE__PARAMETERISED__EXPR__DIV_H__ 00002 #define SESSTYPE__PARAMETERISED__EXPR__DIV_H__ 00003 00004 #include "sesstype/parameterised/expr.h" 00005 00006 #ifdef __cplusplus 00007 namespace sesstype { 00008 namespace parameterised { 00009 #endif 00010 00011 #ifdef __cplusplus 00012 00015 class DivExpr : public BinExpr { 00016 public: 00020 DivExpr(Expr *lhs, Expr *rhs) : BinExpr(ST_EXPR_DIV, lhs, rhs) { } 00021 00023 DivExpr(const DivExpr &expr) 00024 : BinExpr(ST_EXPR_DIV, expr.lhs_->clone(), expr.rhs_->clone()) { } 00025 00027 DivExpr *clone() const override 00028 { 00029 return new DivExpr(*this); 00030 } 00031 00032 bool is_commutative() const override 00033 { 00034 return true; 00035 } 00036 00037 bool is_associative() const override 00038 { 00039 return false; 00040 } 00041 00042 virtual void accept(util::ExprVisitor &v) override; 00043 }; 00044 #endif // __cplusplus 00045 00046 #ifdef __cplusplus 00047 } // namespace parameterised 00048 } // namespace sesstype 00049 #endif 00050 00051 #endif//SESSTYPE__PARAMETERISED__EXPR__DIV_H__