mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-04-27 18:30:54 +02:00
Create a binding for zmq_msg_gets.
Additionally, I've changed some tabs to spaces and remove trailing spaces.
This commit is contained in:
parent
4648ebc964
commit
570ff93ea9
20
zmq.hpp
20
zmq.hpp
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user