22 #ifndef NDN_COMMON_HPP
23 #define NDN_COMMON_HPP
33 #if NDN_CPP_HAVE_STD_SHARED_PTR && NDN_CPP_WITH_STD_SHARED_PTR
36 #elif NDN_CPP_HAVE_BOOST_SHARED_PTR && NDN_CPP_WITH_BOOST_SHARED_PTR
37 #include <boost/shared_ptr.hpp>
38 #include <boost/make_shared.hpp>
39 #include <boost/enable_shared_from_this.hpp>
63 #include <ndnboost/shared_ptr.hpp>
64 #include <ndnboost/make_shared.hpp>
65 #include <ndnboost/enable_shared_from_this.hpp>
66 namespace ndn {
namespace ptr_lib = ndnboost; }
72 #if NDN_CPP_HAVE_STD_FUNCTION && NDN_CPP_WITH_STD_FUNCTION
75 namespace ndn {
namespace func_lib {
81 using std::placeholders::_1;
82 using std::placeholders::_2;
83 using std::placeholders::_3;
84 using std::placeholders::_4;
85 using std::placeholders::_5;
86 using std::placeholders::_6;
87 using std::placeholders::_7;
88 using std::placeholders::_8;
89 using std::placeholders::_9;
93 namespace placeholders {}
95 #elif NDN_CPP_HAVE_BOOST_FUNCTION && NDN_CPP_WITH_BOOST_FUNCTION
96 #include <boost/function.hpp>
97 #include <boost/bind.hpp>
98 namespace ndn {
namespace func_lib =
boost; }
101 #include <ndnboost/function.hpp>
102 #include <ndnboost/bind.hpp>
103 namespace ndn {
namespace func_lib = ndnboost; }
125 toHex(
const uint8_t* array,
size_t arrayLength);
132 static __inline std::string
133 toHex(
const std::vector<uint8_t>& array)
135 return toHex(&array[0], array.size());
double Milliseconds
A time interval represented as the number of milliseconds.
Definition: common.hpp:111
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
Copyright (C) 2015-2016 Regents of the University of California.
Definition: threadsafe-face.hpp:27
Copyright (C) 2015-2016 Regents of the University of California.
void ndn_trim(std::string &str)
Modify str in place to erase whitespace on the left and right.
double MillisecondsSince1970
The calendar time represented as the number of milliseconds since 1/1/1970.
Definition: common.hpp:116
std::string toHex(const uint8_t *array, size_t arrayLength)
Return the hex representation of the bytes in array.
Definition: common.cpp:30