Define i_properties interface

- copy and move message operations are updated to maintain proper
  reference count of properties object
- zmq_msg_gets updated to use i_properties interface to fetch property
  value
- setter/getter added to msg_t class
This commit is contained in:
Martin Hurton
2014-04-30 14:17:38 +02:00
parent ddde62a68c
commit 19c62b93fc
5 changed files with 82 additions and 5 deletions

View File

@@ -25,6 +25,7 @@
#include "config.hpp"
#include "atomic_counter.hpp"
#include "i_properties.hpp"
// Signature for free function to deallocate the message content.
// Note that it has to be declared as "C" so that it is the same as
@@ -70,6 +71,8 @@ namespace zmq
void reset_flags (unsigned char flags_);
int64_t fd ();
void set_fd (int64_t fd_);
i_properties *properties () const;
void set_properties (i_properties *properties_);
bool is_identity () const;
bool is_credential () const;
bool is_delimiter () const;
@@ -86,8 +89,6 @@ namespace zmq
private:
class i_properties;
// Size in bytes of the largest message that is still copied around
// rather than being reference-counted.
enum { msg_t_size = 48 };