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-04 13:05:06
|
Hello Daniel, ----- Original Message ----- > From: Daniel Vallejos <chi...@gm...> > To: cpp...@li... > Cc: > Sent: Friday, November 25, 2011 6:15 AM > Subject: [Cppcms-users] Feature Request: Feature added to cppcms::rpc::json_method > > Hello Ayrtom. > > I added (see attachment) a feature to cppcms::rpc::json_method and it's > 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& o, > json::value& v); > ... > bind("my_method", > json_method(&my_rpc::my_method,this), > json_rpc_server::method_role); > ... > I had reviewed the code it is very good idea. I had changed it a little to handle properly all cases like (foo/foo const/foo const &) and made rather template specialization for struct rather then function. Commited to the trunk to changeset 2013 with updated unit test. Thank you for this patch/idea. > > In theory the changes no breaks backward compatibility and ABI. > Actually till 1.0.0 is released the ABI and even (limited) API can be changed in backward incompatible way. Thanks again, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ |