Re: [Cppcms-users] Feature Request: Feature added to cppcms::rpc::json_method
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2011-12-01 17:53:30
|
I've seen your message but hadn't time to review it. If I don't respond till sunday send me a reminder once again Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ > From: Daniel Vallejos <chi...@gm...> >To: cpp...@li... >Sent: Thursday, December 1, 2011 6:50 PM >Subject: Re: [Cppcms-users] Feature Request: Feature added to cppcms::rpc::json_method > > >Hello Artyom. > >Did you have the time to see the code? > >I added very few lines to rpc_json.h. > >For me it is useful to receive json values const references with zero copy. > > >void foo::bar(json::array const &a, json::object const &o,json::value const &v); >>... >>bind("bar",json_method(&foo::bar,this),json_rpc_server::method_role); >>... >> >Good bye. > >On Fri, 2011-11-25 at 01:15 -0300, Daniel Vallejos wrote: >Hello Ayrtom. I added (see attachment) a feature to cppcms::rpc::json_method and its binders. The feature allow to bind parameters of type: const cppcms::json::value const & cppcms::json::object const & cppcms::json::array const & std::string const & The forwarding of these types are passed by reference (zero copy overhead). For Example we can add a json rpc method of type: void my_rpc::my_method(json::array const& a, json::object const& o, json::value const& v); ... bind("my_method", json_method(&my_rpc::my_method,this), json_rpc_server::method_role); ... In theory the changes no breaks backward compatibility and ABI. In practice my whole project compile with it without change. Please review the code if you wish. Thank you. > >------------------------------------------------------------------------------ >All the data continuously generated in your IT infrastructure >contains a definitive record of customers, application performance, >security threats, fraudulent activity, and more. Splunk takes this >data and makes sense of it. IT sense. And common sense. >http://p.sf.net/sfu/splunk-novd2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |