flexiport.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef __FLEXIPORT_H
00030 #define __FLEXIPORT_H
00031
00032 #include <map>
00033 #include <string>
00034
00035 #if defined (WIN32)
00036 #if defined (FLEXIPORT_STATIC)
00037 #define FLEXIPORT_EXPORT
00038 #elif defined (flexiport_EXPORTS)
00039 #define FLEXIPORT_EXPORT __declspec (dllexport)
00040 #else
00041 #define FLEXIPORT_EXPORT __declspec (dllimport)
00042 #endif
00043 #else
00044 #define FLEXIPORT_EXPORT
00045 #endif
00046
00051 namespace flexiport
00052 {
00053
00055 class FLEXIPORT_EXPORT PortException : public std::exception
00056 {
00057 public:
00058 PortException (const char *errorStr)
00059 : _errorStr (errorStr) {};
00060 PortException (const std::string &errorStr)
00061 : _errorStr (errorStr) {};
00062 ~PortException () throw () {};
00063
00064 virtual const char* what () const throw ()
00065 {
00066 return _errorStr.c_str ();
00067 }
00068
00069 private:
00070 std::string _errorStr;
00071 };
00072
00073
00074 class Port;
00075
00094 FLEXIPORT_EXPORT Port* CreatePort (std::map<std::string, std::string> options);
00095
00106 FLEXIPORT_EXPORT Port* CreatePort (std::string options);
00107
00108 }
00109
00112 #endif // __FLEXIPORT_H
00113