Create a binding for zmq_msg_gets.

Additionally, I've changed some tabs to spaces and remove trailing
spaces.
This commit is contained in:
Mateusz Piotrowski 2016-11-15 22:00:15 +01:00
parent 4648ebc964
commit 570ff93ea9

20
zmq.hpp
View File

@ -71,8 +71,8 @@
#define ZMQ_DELETED_FUNCTION
#endif
#elif defined(_MSC_VER) && (_MSC_VER >= 1900)
#define ZMQ_HAS_RVALUE_REFS
#define ZMQ_DELETED_FUNCTION = delete
#define ZMQ_HAS_RVALUE_REFS
#define ZMQ_DELETED_FUNCTION = delete
#elif defined(_MSC_VER) && (_MSC_VER >= 1600)
#define ZMQ_HAS_RVALUE_REFS
#define ZMQ_DELETED_FUNCTION
@ -124,10 +124,10 @@ namespace zmq
return zmq_strerror (errnum);
}
#else
virtual const char *what() const throw ()
{
return zmq_strerror(errnum);
}
virtual const char *what() const throw ()
{
return zmq_strerror(errnum);
}
#endif
int num () const
{
@ -372,6 +372,14 @@ namespace zmq
return a == b;
}
inline const char* gets(const char *property_) const
{
const char* value = zmq_msg_gets (&msg, property);
if (value == NULL)
throw error_t ();
return value;
}
private:
// The underlying message
zmq_msg_t msg;