![]() |
libsesstype
2.0.0
Library for Session Types programming.
|
00001 00005 #ifndef SESSTYPE__IMPORT_H__ 00006 #define SESSTYPE__IMPORT_H__ 00007 00008 #ifdef __cplusplus 00009 #include <string> 00010 #endif 00011 00012 #ifdef __cplusplus 00013 namespace sesstype { 00014 #endif 00015 00016 #ifdef __cplusplus 00017 00020 class Import { 00021 std::string name_; 00022 std::string from_; 00023 std::string as_; 00024 00025 public: 00027 Import(std::string name) : name_(name), from_(), as_() { } 00028 00032 Import(std::string name, std::string from, std::string as) 00033 : name_(name), from_(from), as_(as) { } 00034 00035 ~Import() = default; 00036 00038 std::string name() const 00039 { 00040 return name_; 00041 } 00042 00044 std::string from() const 00045 { 00046 return from_; 00047 } 00048 00050 std::string as() const 00051 { 00052 return as_; 00053 } 00054 }; 00055 #endif // __cplusplus 00056 00057 #ifdef __cplusplus 00058 extern "C"{ 00059 #endif 00060 00061 #ifdef __cplusplus 00062 typedef Import st_import; 00063 #else 00064 typedef struct Import st_import; 00065 #endif 00066 00069 st_import *st_import_mk_init(const char *name); 00070 00075 st_import *st_import_mk_alias(const char *name, const char *from, const char *as); 00076 00078 void st_import_free(st_import *import); 00079 00080 #ifdef __cplusplus 00081 } // extern "C" 00082 #endif 00083 00084 #ifdef __cplusplus 00085 } // namespace sesstype 00086 #endif 00087 00088 #endif