libsesstype  2.0.0
Library for Session Types programming.
continue.h
00001 #ifndef SESSTYPE__NODE__CONTINUE_H__
00002 #define SESSTYPE__NODE__CONTINUE_H__
00003 
00004 #ifdef __cplusplus
00005 #include <string>
00006 #endif
00007 
00008 #include "sesstype/msg.h"
00009 #include "sesstype/role.h"
00010 #include "sesstype/node.h"
00011 #include "sesstype/node/block.h"
00012 
00013 #ifdef __cplusplus
00014 namespace sesstype {
00015 #endif
00016 
00017 #ifdef __cplusplus
00018 
00021 template <class BaseNode, class RoleType, class MessageType, class VisitorType>
00022 class ContinueNodeTmpl : public BaseNode {
00023     std::string label_;
00024 
00025   public:
00028     ContinueNodeTmpl(std::string label)
00029         : BaseNode(ST_NODE_CONTINUE),
00030           label_(label) { }
00031 
00033     ContinueNodeTmpl(const ContinueNodeTmpl &node)
00034         : BaseNode(ST_NODE_CONTINUE),
00035           label_(node.label_) { }
00036 
00038     ContinueNodeTmpl *clone() const override
00039     {
00040         return new ContinueNodeTmpl(*this);
00041     }
00042 
00045     void set_label(std::string label)
00046     {
00047         label_ = label;
00048     }
00049 
00051     std::string label() const
00052     {
00053         return label_;
00054     }
00055 
00056     void accept(VisitorType &v) override;
00057 };
00058 
00059 using ContinueNode = ContinueNodeTmpl<Node, Role, MsgSig, util::NodeVisitor>;
00060 #endif // __cplusplus
00061 
00062 #ifdef __cplusplus
00063 extern "C" {
00064 #endif
00065 
00066 st_node *st_mk_continue_node(char *label);
00067 
00068 st_node *st_continue_node_set_label(st_node *node, char *label);
00069 
00070 const char *st_continue_node_get_label(st_node *node);
00071 
00072 #ifdef __cplusplus
00073 } // extern "C"
00074 #endif
00075 
00076 #ifdef __cplusplus
00077 } // namspace sesstype
00078 #endif
00079 
00080 #endif//SESSTYPE__NODE__CONTINUE_H__
 All Classes Namespaces Files Functions