19 #ifndef _PTREE_QUEUE_HPP_
20 #define _PTREE_QUEUE_HPP_
23 #include <boost/scoped_ptr.hpp>
24 #include <boost/asio.hpp>
25 #include <boost/property_tree/ptree.hpp>
26 #include <boost/property_tree/json_parser.hpp>
40 boost::shared_ptr<std::string>
encode(
const boost::shared_ptr<boost::property_tree::ptree> obj2encode)
42 using namespace boost::property_tree::json_parser;
44 std::stringstream tosstrm;
46 write_json(tosstrm, (*obj2encode.get()),
false);
52 boost::shared_ptr<boost::property_tree::ptree>
decode(std::string& str2decode)
54 using namespace boost::property_tree::json_parser;
56 boost::shared_ptr<boost::property_tree::ptree> tPtreePtr;
58 std::stringstream fromStream;
60 tPtreePtr.reset(
new boost::property_tree::ptree());
62 fromStream << (*jsonString.get());
64 read_json(fromStream, (*tPtreePtr.get()));
~PtreeBase64Bicoder()
Definition: ptree_queue.hpp:37
boost::shared_ptr< std::string > encode(const boost::shared_ptr< boost::property_tree::ptree > obj2encode)
Definition: ptree_queue.hpp:40
Definition: persisted_queue.hpp:114
ThreadsafePersistedQueue< boost::property_tree::ptree, PtreeBase64Bicoder > SafePtreeQ
Definition: ptree_queue.hpp:74
PtreeBase64Bicoder()
Definition: ptree_queue.hpp:36
boost::shared_ptr< std::string > encodeToBase64String(const std::string &s)
Definition: persisted_queue.hpp:64
Definition: persisted_queue.hpp:51
boost::shared_ptr< PtreeQ > SharedPtreeQ
Definition: ptree_queue.hpp:71
boost::shared_ptr< boost::property_tree::ptree > decode(std::string &str2decode)
Definition: ptree_queue.hpp:52
boost::shared_ptr< SafePtreeQ > SharedSafePtreeQ
Definition: ptree_queue.hpp:75
PersistedQueue< boost::property_tree::ptree, PtreeBase64Bicoder > PtreeQ
Definition: ptree_queue.hpp:70
boost::scoped_ptr< PtreeQ > ScopedPtreeQ
Definition: ptree_queue.hpp:72
Definition: ptree_queue.hpp:33
boost::shared_ptr< std::string > decodeFromBase64(const std::string &s)
Definition: persisted_queue.hpp:77
boost::scoped_ptr< SafePtreeQ > ScopedSafePtreeQ
Definition: ptree_queue.hpp:76
Definition: threadsafe_persisted_queue.hpp:34