metadata.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MPL-2.0 */
2 
3 #include "precompiled.hpp"
4 #include "metadata.hpp"
5 
6 zmq::metadata_t::metadata_t (const dict_t &dict_) : _ref_cnt (1), _dict (dict_)
7 {
8 }
9 
10 const char *zmq::metadata_t::get (const std::string &property_) const
11 {
12  const dict_t::const_iterator it = _dict.find (property_);
13  if (it == _dict.end ()) {
15  if (property_ == "Identity")
17 
18  return NULL;
19  }
20  return it->second.c_str ();
21 }
22 
24 {
25  _ref_cnt.add (1);
26 }
27 
29 {
30  return !_ref_cnt.sub (1);
31 }
zmq::metadata_t::metadata_t
metadata_t(const dict_t &dict_)
Definition: metadata.cpp:6
NULL
NULL
Definition: test_security_zap.cpp:405
get
ROSCPP_DECL bool get(const std::string &key, bool &b)
precompiled.hpp
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
zmq::metadata_t::dict_t
std::map< std::string, std::string > dict_t
Definition: metadata.hpp:16
zmq::metadata_t::add_ref
void add_ref()
Definition: metadata.cpp:23
zmq::metadata_t::get
const char * get(const std::string &property_) const
Definition: metadata.cpp:10
zmq::metadata_t::drop_ref
bool drop_ref()
Definition: metadata.cpp:28
metadata.hpp
ZMQ_MSG_PROPERTY_ROUTING_ID
#define ZMQ_MSG_PROPERTY_ROUTING_ID
Definition: zmq_draft.h:95
it
MapIter it
Definition: php/ext/google/protobuf/map.c:205


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:57