mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-20 02:17:55 +00:00
commit
0303131390
@ -25,10 +25,6 @@ zmq::metadata_t::metadata_t (const dict_t &dict) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
zmq::metadata_t::~metadata_t ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *zmq::metadata_t::get (const std::string &property) const
|
const char *zmq::metadata_t::get (const std::string &property) const
|
||||||
{
|
{
|
||||||
dict_t::const_iterator it = dict.find (property);
|
dict_t::const_iterator it = dict.find (property);
|
||||||
|
@ -30,29 +30,29 @@ namespace zmq
|
|||||||
class metadata_t
|
class metadata_t
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
typedef std::map <std::string, std::string> dict_t;
|
||||||
typedef std::map <std::string, const std::string> dict_t;
|
|
||||||
|
|
||||||
metadata_t (const dict_t &dict);
|
metadata_t (const dict_t &dict);
|
||||||
virtual ~metadata_t ();
|
|
||||||
|
|
||||||
// Returns pointer to property value or NULL if
|
// Returns pointer to property value or NULL if
|
||||||
// property is not found.
|
// property is not found.
|
||||||
virtual const char *get (const std::string &property) const;
|
const char *get (const std::string &property) const;
|
||||||
|
|
||||||
virtual void add_ref ();
|
void add_ref ();
|
||||||
|
|
||||||
// Drop reference. Returns true iff the reference
|
// Drop reference. Returns true iff the reference
|
||||||
// counter drops to zero.
|
// counter drops to zero.
|
||||||
virtual bool drop_ref ();
|
bool drop_ref ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
metadata_t(const metadata_t&);
|
||||||
|
metadata_t & operator=(const metadata_t&);
|
||||||
|
|
||||||
// Reference counter.
|
// Reference counter.
|
||||||
atomic_counter_t ref_cnt;
|
atomic_counter_t ref_cnt;
|
||||||
|
|
||||||
// Dictionary holding metadata.
|
// Dictionary holding metadata.
|
||||||
const dict_t dict;
|
dict_t dict;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user