![]() |
libsesstype
2.0.0
Library for Session Types programming.
|
00001 #ifndef SESSTYPE__PARAMETERISED__EXPR__VAR_H__ 00002 #define SESSTYPE__PARAMETERISED__EXPR__VAR_H__ 00003 00004 #ifdef __cplusplus 00005 #include <string> 00006 #endif 00007 00008 #include "sesstype/parameterised/expr.h" 00009 00010 #ifdef __cplusplus 00011 namespace sesstype { 00012 namespace parameterised { 00013 #endif 00014 00015 #ifdef __cplusplus 00016 00019 class VarExpr : public Expr { 00020 std::string name_; 00021 00022 public: 00025 VarExpr(std::string name) : Expr(ST_EXPR_VAR), name_(name) { } 00026 00028 VarExpr(const VarExpr &expr) : Expr(ST_EXPR_VAR), name_(expr.name_) { } 00029 00031 VarExpr *clone() const override 00032 { 00033 return new VarExpr(*this); 00034 } 00035 00037 std::string name() const 00038 { 00039 return name_; 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__VAR_H__