poco-libraries

How to create and parse hierarchical/nested JSON with Poco C++?

人走茶凉 提交于 2019-12-21 18:00:50
问题 Edited to simplify and show my EXACT code. I have the following data that I need to serialize to JSON as well as parse from JSON. string name; std::map<string, string> metaData; I need the JSON to be nested/hierarchical like this: { "name":"john smith" "metadata": { "age":45, "middle_name":"william", }, } Here is my EXACT code: void DeserializeFromJSON(string &jsonString) { // Parse the JSON Poco::JSON::Parser jsonParser; Poco::Dynamic::Var parsedJSON = jsonParser.parse(jsonString); Poco:

How to transfer a C++ object to a web service using POCO library

霸气de小男生 提交于 2019-12-19 09:55:09
问题 I have an image processing application that uses Qt and openCV. for each frame, I should send the captured cv::Mat image object to the server to process it and get the results. I should use the REST architecture for its low playload. What is the tool that I should use to send cv::Mat to the server. I am using POCO for portability. I seek for the lightest solution to do that, I need a minimum speed of 10 frames processed by the server in a second. I mean, is there a method to pass the C++

ACE vs Boost vs POCO [closed]

99封情书 提交于 2019-12-17 15:01:59
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . I have been working with the Boost C++ Libraries for quite some time. I absolutely love the Boost Asio C++ library for network programming. However I was introduced to two other libraries: POCO and Adaptive Communication Environment (ACE) framework. I would like to know the

Not able to get poco 1.6.1 or 1.7.6 to bind to ipv6 with Net::DatagramSocket

让人想犯罪 __ 提交于 2019-12-14 04:23:03
问题 Using the following code I can bind to an ipv4 address but not to a scope global ipv6 address that is also bound to this same machine. I am compiling the code like this: g++ -lPocoFoundation -lPocoXML -lPocoUtil -lPocoNet -lcrypto -lssl -I/usr/include/Poco -o pocoudpipv6 pocoudpipv6.cpp When I execute ./pocoudpipv6 10.X.X.X , it holds open the socket and cycles on "Waiting..." until I hit ctrl-c, which is expected. ss reports the socket: # ss -nelup |grep 20000 UNCONN 0 0 10.X.X.X:20000 *:*

integrate POCO library in android ndk

≯℡__Kan透↙ 提交于 2019-12-13 16:00:07
问题 i am trying to develop cross platform app ( on native level ) that uses POCO socket library with android NDK . but i dont know how to integrate/use POCO library in android NDK using gradle in studio. i am using com.android.tools.build:gradle-experimental:0.7.0 gradle version. And following is my build.gradle . apply plugin: 'com.android.model.application' model { android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.ndkproto" minSdkVersion.apiLevel = 22

Pointer to member type incompatible with object type → What is the cause?

六月ゝ 毕业季﹏ 提交于 2019-12-13 09:35:37
问题 Recently I ran into a compiler (GNU g++ 4.9.2) error like this: ProceduralTimerTaskAdapter.cpp:25:13: error: pointer to member type ‘void (Poco::Util::Timer::)(Poco::Util::TimerTask&)’ incompatible with object type ‘Poco::Util::ProceduralTimerTaskAdapter’ Here is the relevant code (which is almost self-contained, save for the necessary Poco libs): ProceduralTimerTaskAdapter.h: #include <Poco/Util/Timer.h> #include <Poco/Util/TimerTask.h> #include <Poco/Util/TimerTaskAdapter.h> #ifndef

'Keywords' is not a namespace-name

亡梦爱人 提交于 2019-12-13 07:12:11
问题 I'm a half decent Java/C# programmer struggling with C++/PoCo. All the examples I have seen so far have the same line. using namespace Poco::Data::Keywords; In QT, the "Keywords" part is black. I don't know what to "#include" if that would fix it. Codeblocks also fails with the same error => 'Keywords' is not a namespace-name A small example: #include <Poco/Format.h> #include <Poco/Data/MySQL/MySQLException.h> #include <Poco/Data/Session.h> #include <Poco/Data/MySQL/Connector.h> using

LinearHashTable iter not dereferencable and iter not

萝らか妹 提交于 2019-12-13 06:58:35
问题 Hy all :) I am using 1.5.4-all (2014-10-22) in my VC++ project (Microsoft Visual C++ Compiler 18.00.21005.1 for x86 platform). My problem is that I get the following error message after some time. The time, after which the error occurs differ quiet a lot - sometimes it happens after 30 secs and sometimes after 5 minutes. I could locate the source for the error in the LinearHashTable.h file at line 214: I have the following method where a Shot (struct) is added to the table: void

Sending HTML code in a mail using Poco library

前提是你 提交于 2019-12-13 00:20:07
问题 I'm using the POCO library in C++ (1.5.2) , and i wonder if it is possible to send HTML code in a mail. This is the code I'm using for sending email (via my gmail): #include <iostream> #include <string> #include <Poco\Net\AcceptCertificateHandler.h> #include <Poco\Net\FilePartSource.h> #include <Poco\Net\InvalidCertificateHandler.h> #include <Poco\Net\MailMessage.h> #include <Poco\Net\NetException.h> #include <Poco\Net\SecureSMTPClientSession.h> #include <Poco\Net\SSLManager.h> int main() {

Rationale for protected destructor

一个人想着一个人 提交于 2019-12-12 10:58:41
问题 I have noticed that many Poco classes have a protected destructor. This makes them more annoying to code with. For example here is some of my code: struct W2: Poco::Util::WinRegistryConfiguration { typedef Poco::Util::WinRegistryConfiguration inherited; using inherited::inherited; }; std::string get_documents_folder() { W2 regc { "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders" }; return regc.getString("Personal", ""); } Of course, it would be much