Thread: [Cppcms-users] Compile error: traits is not a template
Brought to you by:
artyom-beilis
From: 陈抒 <csf...@gm...> - 2012-08-31 15:37:14
|
I have a correct class with no compilation error. All codes in response.h: #ifndef __RESPONSE_H #define __RESPONSE_H namespace kaimei{ class response { public: enum {OK=0,SAVE_EMAIL_ERROR=1,CHANGE_PWD_ERROR=2,LOGIN_ERROR=3,CREATE_ACCOUNT_ERROR=4, SAVE_MESSAGE_ERROR=5,CHANGE_LANGUAGE_ERROR=6,NONE_CONTENT=7,LOAD_DISPLAY_ERROR=8, NONE_USER_ID=9,GET_MESSAGE_LOG_ERROR=10,QUIT_ERROR=11,NONE_ADMIN=12,BIND_ERROR=13, UPDATE_DESCRIPTION_ERROR=14,UNBIND_ERROR=15,LOAD_GROUPS_ERROR=16,UPDATE_GROUP_NAME_ERROR=17 }; int status; string message; string value; }; } namespace cppcms { namespace json { template<> struct traits<kaimei::response> { static void set(value &v, kaimei::response const& in) { v.set("status", in.status); v.set("message", in.message); v.set("value", in.value); } }; } } #endif But I got error when compiling another class. It has group.h and group.cpp file. #ifndef __GROUP_H #define __GROUP_H #include <string> namespace kaimei{ class group { public: group(); std::string id; std::string description; std::string name; int device_number; std::string json_string() const; }; } namespace cppcms { namespace json { template<> struct traits<kaimei::group> { static void set(value &v, kaimei::group const& in) { v.set("id", in.id); v.set("description", in.description); v.set("name", in.name); v.set("deviceNumber", in.device_number); } }; } } #endif Error output: [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o In file included from /home/chenshu/work/kaimei/cppweb/include/groups.h:6:0, from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: /home/chenshu/work/kaimei/cppweb/include/group.h:24:14: error: ‘traits’ is not a template /home/chenshu/work/kaimei/cppweb/include/group.h:24:36: error: explicit specialization of non-template ‘cppcms::json::traits’ /home/chenshu/work/kaimei/cppweb/include/group.h:26:23: error: ‘value’ has not been declared /home/chenshu/work/kaimei/cppweb/include/group.h: In static member function ‘static void cppcms::json::traits::set(int&, const kaimei::group&)’: /home/chenshu/work/kaimei/cppweb/include/group.h:27:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ /home/chenshu/work/kaimei/cppweb/include/group.h:28:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ /home/chenshu/work/kaimei/cppweb/include/group.h:29:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ /home/chenshu/work/kaimei/cppweb/include/group.h:30:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ I am not good at template programming. Why did this happen? 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: 陈抒 <csf...@gm...> - 2012-08-31 15:59:11
|
Forgot another class: groups . It contains several group objects in vector. Here is groups.h content: #ifndef __GROUPS_H #define __GROUPS_H #include <vector> #include <boost/shared_ptr.hpp> #include "group.h" class groups{ public: typedef std::vector<boost::shared_ptr<group> >::iterator iterator; typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; void add(boost::shared_ptr<group> g); bool empty() const; unsigned int size() const; std::string json_string() const; friend cppcms::json::traits<kaimei::group>; private: std::vector<boost::shared_ptr<group> > values_; }; namespace cppcms { namespace json { template<> struct traits<kaimei::groups> { static void set(value &v, kaimei::groups const& in) { v.set("size", groups.size()); v.set("values", in.values_); } }; } } #endif 陈抒 Best regards http://blog.csdn.net/sheismylife On Fri, Aug 31, 2012 at 11:36 PM, 陈抒 <csf...@gm...> wrote: > I have a correct class with no compilation error. All codes in response.h: > #ifndef __RESPONSE_H > #define __RESPONSE_H > > namespace kaimei{ > class response { > public: > enum > {OK=0,SAVE_EMAIL_ERROR=1,CHANGE_PWD_ERROR=2,LOGIN_ERROR=3,CREATE_ACCOUNT_ERROR=4, > SAVE_MESSAGE_ERROR=5,CHANGE_LANGUAGE_ERROR=6,NONE_CONTENT=7,LOAD_DISPLAY_ERROR=8, > > NONE_USER_ID=9,GET_MESSAGE_LOG_ERROR=10,QUIT_ERROR=11,NONE_ADMIN=12,BIND_ERROR=13, > UPDATE_DESCRIPTION_ERROR=14,UNBIND_ERROR=15,LOAD_GROUPS_ERROR=16,UPDATE_GROUP_NAME_ERROR=17 > }; > int status; > string message; > string value; > }; > } > > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::response> { > > static void set(value &v, kaimei::response const& in) { > v.set("status", in.status); > v.set("message", in.message); > v.set("value", in.value); > } > }; > > } > } > > #endif > > > But I got error when compiling another class. It has group.h and group.cpp > file. > > #ifndef __GROUP_H > #define __GROUP_H > > #include <string> > > namespace kaimei{ > class group { > public: > group(); > > std::string id; > std::string description; > std::string name; > int device_number; > > std::string json_string() const; > }; > } > > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::group> { > > static void set(value &v, kaimei::group const& in) { > v.set("id", in.id); > v.set("description", in.description); > v.set("name", in.name); > v.set("deviceNumber", in.device_number); > } > }; > > } > } > > > #endif > > Error output: > > [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > In file included from > /home/chenshu/work/kaimei/cppweb/include/groups.h:6:0, > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > /home/chenshu/work/kaimei/cppweb/include/group.h:24:14: error: ‘traits’ is > not a template > /home/chenshu/work/kaimei/cppweb/include/group.h:24:36: error: explicit > specialization of non-template ‘cppcms::json::traits’ > /home/chenshu/work/kaimei/cppweb/include/group.h:26:23: error: ‘value’ has > not been declared > /home/chenshu/work/kaimei/cppweb/include/group.h: In static member > function ‘static void cppcms::json::traits::set(int&, const > kaimei::group&)’: > /home/chenshu/work/kaimei/cppweb/include/group.h:27:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > /home/chenshu/work/kaimei/cppweb/include/group.h:28:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > /home/chenshu/work/kaimei/cppweb/include/group.h:29:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > /home/chenshu/work/kaimei/cppweb/include/group.h:30:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > > > I am not good at template programming. Why did this happen? > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > |
From: Artyom B. <art...@ya...> - 2012-09-01 06:34:34
|
> >But I got error when compiling another class. It has group.h and group.cpp file. > > >#ifndef __GROUP_H >#define __GROUP_H > > >#include <string> > > >namespace kaimei{ >... } > > >namespace cppcms { > namespace json { > template<> > struct traits<kaimei::group> { >... > } > } >} > > > > [snip] > >I am not good at template programming. Why did this happen? > You can't specialize undefined struct - you need to include <cppcms/json.h> header. It provides the original traits struct and than you specialize it for your type of class > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > Regards, Artyom |
From: 陈抒 <csf...@gm...> - 2012-09-01 07:06:05
|
Thank you. But I see new error. groups.h file: #ifndef __GROUPS_H #define __GROUPS_H #include <vector> #include <boost/shared_ptr.hpp> #include "group.h" namespace kaimei{ class groups{ public: typedef std::vector<boost::shared_ptr<group> >::iterator iterator; typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; void add(boost::shared_ptr<group> g); bool empty() const; unsigned int size() const; std::string json_string() const; friend class cppcms::json::traits<kaimei::groups>; private: std::vector<boost::shared_ptr<kaimei::group> > values_; }; } namespace cppcms { namespace json { template<> struct traits<kaimei::groups> { static void set(value &v, kaimei::groups const& in) { v.set("size", in.size()); v.set("values", in.values_); } }; } } #endif error message: 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp [ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: /usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: /usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ /usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ /usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ /usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ /home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here /usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 make: *** [all] Error 2 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: > > > > >But I got error when compiling another class. It has group.h and > group.cpp file. > > > > > >#ifndef __GROUP_H > >#define __GROUP_H > > > > > >#include <string> > > > > > >namespace kaimei{ > >... > } > > > > > >namespace cppcms { > > namespace json { > > template<> > > struct traits<kaimei::group> { > >... > > } > > } > >} > > > > > > > > [snip] > > > >I am not good at template programming. Why did this happen? > > > > You can't specialize undefined struct - you need to include <cppcms/json.h> > header. It provides the original traits struct and than you specialize it > for > your type of class > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > Regards, > Artyom > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: 陈抒 <csf...@gm...> - 2012-09-01 07:07:19
|
json.h was added into group.h groups.h include group.h 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 3:05 PM, 陈抒 <csf...@gm...> wrote: > Thank you. But I see new error. > groups.h file: > > #ifndef __GROUPS_H > #define __GROUPS_H > > #include <vector> > #include <boost/shared_ptr.hpp> > #include "group.h" > > namespace kaimei{ > > class groups{ > public: > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > typedef std::vector<boost::shared_ptr<group> >::const_iterator > const_iterator; > > void add(boost::shared_ptr<group> g); > > bool empty() const; > > unsigned int size() const; > > std::string json_string() const; > > friend class cppcms::json::traits<kaimei::groups>; > > private: > std::vector<boost::shared_ptr<kaimei::group> > values_; > }; > > } > > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::groups> { > > static void set(value &v, kaimei::groups const& in) { > v.set("size", in.size()); > v.set("values", in.values_); > } > }; > > } > } > > #endif > > > error message: > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, > ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, > ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, > ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, > ../../src/view/login.cpp, ../../src/view/group_management.cpp > [ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > /usr/include/cppcms/json.h: In member function ‘void > cppcms::json::value::set_value(const T&) [with T = > boost::shared_ptr<kaimei::group>]’: > /usr/include/cppcms/json.h:604:5: instantiated from ‘static void > cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const > std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ > /usr/include/cppcms/json.h:247:4: instantiated from ‘void > cppcms::json::value::set_value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > /usr/include/cppcms/json.h:316:4: instantiated from > ‘cppcms::json::value::value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > /usr/include/cppcms/json.h:352:4: instantiated from ‘void > cppcms::json::value::set(const char*, const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > /home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated > from here > /usr/include/cppcms/json.h:247:4: error: incomplete type > ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested > name specifier > make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > make: *** [all] Error 2 > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: > >> > >> >> >But I got error when compiling another class. It has group.h and >> group.cpp file. >> > >> > >> >#ifndef __GROUP_H >> >#define __GROUP_H >> > >> > >> >#include <string> >> > >> > >> >namespace kaimei{ >> >... >> } >> > >> > >> >namespace cppcms { >> > namespace json { >> > template<> >> > struct traits<kaimei::group> { >> >... >> > } >> > } >> >} >> > >> > >> > >> > [snip] >> > >> >I am not good at template programming. Why did this happen? >> > >> >> You can't specialize undefined struct - you need to include >> <cppcms/json.h> >> header. It provides the original traits struct and than you specialize it >> for >> your type of class >> >> >> > >> >陈抒 >> >Best regards >> >http://blog.csdn.net/sheismylife >> > >> >> Regards, >> Artyom >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > |
From: Artyom B. <art...@ya...> - 2012-09-01 09:41:48
|
Because shared_ptr<group> is not specialized for traits... You need manually create an array and sets its memebers.i.e Something like that: cppcms::json::array &a=v.at("values",cppcms::json::array()); a.resize(in.values_.size()); for(size_t i = 0;i<in.values_.size();i++) a[i]=*in.values_[i]; Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, September 1, 2012 10:05 AM >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > >Thank you. But I see new error. >groups.h file: > > >#ifndef __GROUPS_H >#define __GROUPS_H > > >#include <vector> >#include <boost/shared_ptr.hpp> >#include "group.h" > > >namespace kaimei{ > > > class groups{ > public: > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; > > > void add(boost::shared_ptr<group> g); > > > bool empty() const; > > > unsigned int size() const; > > > std::string json_string() const; > > friend class cppcms::json::traits<kaimei::groups>; > > > private: > std::vector<boost::shared_ptr<kaimei::group> > values_; > }; > > >} > > >namespace cppcms { > namespace json { > > > template<> > struct traits<kaimei::groups> { > > > static void set(value &v, kaimei::groups const& in) { >v.set("size", in.size()); >v.set("values", in.values_); > } > }; > > > } >} > > >#endif > > > > >error message: > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >/usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >/usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >/usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >/usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here >/usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >make: *** [all] Error 2 > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: > >> >> >>>But I got error when compiling another class. It has group.h and group.cpp file. >>> >>> >>>#ifndef __GROUP_H >>>#define __GROUP_H >>> >>> >>>#include <string> >>> >>> >>>namespace kaimei{ >>>... >> >>} >>> >>> >>>namespace cppcms { >>> namespace json { >>> template<> >>> struct traits<kaimei::group> { >>>... >>> } >>> } >>>} >>> >>> >>> >>> [snip] >> >>> >>>I am not good at template programming. Why did this happen? >>> >> >>You can't specialize undefined struct - you need to include <cppcms/json.h> >>header. It provides the original traits struct and than you specialize it for >>your type of class >> >> >> >>> >>>陈抒 >>>Best regards >>>http://blog.csdn.net/sheismylife >>> >> >>Regards, >>Artyom >> >> >>------------------------------------------------------------------------------ >>Live Security Virtual Conference >>Exclusive live event will cover all the ways today's security and >>threat landscape has changed and how IT managers can respond. Discussions >>will include endpoint security, mobile security and the latest in malware >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2012-09-01 12:32:59
|
I changed your codes a bit. namespace cppcms { namespace json { template<> struct traits<kaimei::groups> { static void set(value &v, kaimei::groups const& in) { v.set("size", in.size()); cppcms::json::array a; a.resize(in.values_.size()); for(size_t i = 0; i < in.values_.size(); i++) { a[i]=*in.values_[i]; } v.set("values", a); } }; } } Two issues: 1. This way is not efficient, a lot of deep copy would occur when copying vector from array. My original way is very simple, create a stringstream object, groups object converts all member variables into string, append them to stringstream. It does not looks elegant, but faster. 2. It doesn't work. I got an exception: cppcms::json::bad_cast: error converting from object 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: > Because shared_ptr<group> is not specialized for traits... > > You need manually create an array and sets its memebers.i.e > > Something like that: > > cppcms::json::array &a=v.at("values",cppcms::json::array()); > a.resize(in.values_.size()); > for(size_t i = 0;i<in.values_.size();i++) > a[i]=*in.values_[i]; > > > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > >________________________________ > > From: 陈抒 <csf...@gm...> > >To: Artyom Beilis <art...@ya...>; > cpp...@li... > >Sent: Saturday, September 1, 2012 10:05 AM > >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > > > > >Thank you. But I see new error. > >groups.h file: > > > > > >#ifndef __GROUPS_H > >#define __GROUPS_H > > > > > >#include <vector> > >#include <boost/shared_ptr.hpp> > >#include "group.h" > > > > > >namespace kaimei{ > > > > > > class groups{ > > public: > > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > > typedef std::vector<boost::shared_ptr<group> >::const_iterator > const_iterator; > > > > > > void add(boost::shared_ptr<group> g); > > > > > > bool empty() const; > > > > > > unsigned int size() const; > > > > > > std::string json_string() const; > > > > friend class cppcms::json::traits<kaimei::groups>; > > > > > > private: > > std::vector<boost::shared_ptr<kaimei::group> > values_; > > }; > > > > > >} > > > > > >namespace cppcms { > > namespace json { > > > > > > template<> > > struct traits<kaimei::groups> { > > > > > > static void set(value &v, kaimei::groups const& in) { > >v.set("size", in.size()); > >v.set("values", in.values_); > > } > > }; > > > > > > } > >} > > > > > >#endif > > > > > > > > > >error message: > > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, > ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, > ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, > ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, > ../../src/view/login.cpp, ../../src/view/group_management.cpp > >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > >In file included from > /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > >/usr/include/cppcms/json.h: In member function ‘void > cppcms::json::value::set_value(const T&) [with T = > boost::shared_ptr<kaimei::group>]’: > >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void > cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const > std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ > >/usr/include/cppcms/json.h:247:4: instantiated from ‘void > cppcms::json::value::set_value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:316:4: instantiated from > ‘cppcms::json::value::value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:352:4: instantiated from ‘void > cppcms::json::value::set(const char*, const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated > from here > >/usr/include/cppcms/json.h:247:4: error: incomplete type > ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested > name specifier > >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > >make: *** [all] Error 2 > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > > > > >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> > wrote: > > > >> > >> > >>>But I got error when compiling another class. It has group.h and > group.cpp file. > >>> > >>> > >>>#ifndef __GROUP_H > >>>#define __GROUP_H > >>> > >>> > >>>#include <string> > >>> > >>> > >>>namespace kaimei{ > >>>... > >> > >>} > >>> > >>> > >>>namespace cppcms { > >>> namespace json { > >>> template<> > >>> struct traits<kaimei::group> { > >>>... > >>> } > >>> } > >>>} > >>> > >>> > >>> > >>> [snip] > >> > >>> > >>>I am not good at template programming. Why did this happen? > >>> > >> > >>You can't specialize undefined struct - you need to include > <cppcms/json.h> > >>header. It provides the original traits struct and than you specialize > it for > >>your type of class > >> > >> > >> > >>> > >>>陈抒 > >>>Best regards > >>>http://blog.csdn.net/sheismylife > >>> > >> > >>Regards, > >>Artyom > >> > >> > > >>------------------------------------------------------------------------------ > >>Live Security Virtual Conference > >>Exclusive live event will cover all the ways today's security and > >>threat landscape has changed and how IT managers can respond. Discussions > >>will include endpoint security, mobile security and the latest in malware > >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >>_______________________________________________ > >>Cppcms-users mailing list > >>Cpp...@li... > >>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > > > > >------------------------------------------------------------------------------ > >Live Security Virtual Conference > >Exclusive live event will cover all the ways today's security and > >threat landscape has changed and how IT managers can respond. Discussions > >will include endpoint security, mobile security and the latest in malware > >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-09-01 13:15:33
|
You hadn't read my code correctly cppcms::json::array &a=v.at("values",cppcms::json::array()); a is a reference and you fill it. Anyway read the cppcms::json::value reference documentation for further details Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, September 1, 2012 3:32 PM >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > >I changed your codes a bit. >namespace cppcms { > namespace json { > > > template<> > struct traits<kaimei::groups> { > > > static void set(value &v, kaimei::groups const& in) { >v.set("size", in.size()); >cppcms::json::array a; >a.resize(in.values_.size()); >for(size_t i = 0; i < in.values_.size(); i++) { > a[i]=*in.values_[i]; >} >v.set("values", a); > } > }; > > > } >} > > >Two issues: >1. This way is not efficient, a lot of deep copy would occur when copying vector from array. >My original way is very simple, create a stringstream object, groups object converts all member variables into string, append them to stringstream. It does not looks elegant, but faster. >2. It doesn't work. I got an exception: >cppcms::json::bad_cast: error converting from object > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: > >Because shared_ptr<group> is not specialized for traits... >> >>You need manually create an array and sets its memebers.i.e >> >>Something like that: >> >>cppcms::json::array &a=v.at("values",cppcms::json::array()); >>a.resize(in.values_.size()); >>for(size_t i = 0;i<in.values_.size();i++) >> a[i]=*in.values_[i]; >> >> >> >> >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >>>________________________________ >>> From: 陈抒 <csf...@gm...> >>>To: Artyom Beilis <art...@ya...>; cpp...@li... >>>Sent: Saturday, September 1, 2012 10:05 AM >>>Subject: Re: [Cppcms-users] Compile error: traits is not a template >> >>> >>> >>>Thank you. But I see new error. >>>groups.h file: >>> >>> >>>#ifndef __GROUPS_H >>>#define __GROUPS_H >>> >>> >>>#include <vector> >>>#include <boost/shared_ptr.hpp> >>>#include "group.h" >>> >>> >>>namespace kaimei{ >>> >>> >>> class groups{ >>> public: >>> typedef std::vector<boost::shared_ptr<group> >::iterator iterator; >>> typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; >>> >>> >>> void add(boost::shared_ptr<group> g); >>> >>> >>> bool empty() const; >>> >>> >>> unsigned int size() const; >>> >>> >>> std::string json_string() const; >>> >>> friend class cppcms::json::traits<kaimei::groups>; >>> >>> >>> private: >>> std::vector<boost::shared_ptr<kaimei::group> > values_; >>> }; >>> >>> >>>} >>> >>> >>>namespace cppcms { >>> namespace json { >>> >>> >>> template<> >>> struct traits<kaimei::groups> { >>> >>> >>> static void set(value &v, kaimei::groups const& in) { >>>v.set("size", in.size()); >>>v.set("values", in.values_); >>> } >>> }; >>> >>> >>> } >>>} >>> >>> >>>#endif >>> >>> >>> >>> >>>error message: >>> 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp >>>[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >>>In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, >>> from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, >>> from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >>>/usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: >>>/usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >>>/usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>/usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>/usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here >>>/usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier >>>make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >>>make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >>>make: *** [all] Error 2 >>> >>> >>>陈抒 >>>Best regards >>>http://blog.csdn.net/sheismylife >>> >>> >>> >>>On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: >>> >>>> >>>> >>>>>But I got error when compiling another class. It has group.h and group.cpp file. >>>>> >>>>> >>>>>#ifndef __GROUP_H >>>>>#define __GROUP_H >>>>> >>>>> >>>>>#include <string> >>>>> >>>>> >>>>>namespace kaimei{ >>>>>... >>>> >>>>} >>>>> >>>>> >>>>>namespace cppcms { >>>>> namespace json { >>>>> template<> >>>>> struct traits<kaimei::group> { >>>>>... >>>>> } >>>>> } >>>>>} >>>>> >>>>> >>>>> >>>>> [snip] >>>> >>>>> >>>>>I am not good at template programming. Why did this happen? >>>>> >>>> >>>>You can't specialize undefined struct - you need to include <cppcms/json.h> >>>>header. It provides the original traits struct and than you specialize it for >>>>your type of class >>>> >>>> >>>> >>>>> >>>>>陈抒 >>>>>Best regards >>>>>http://blog.csdn.net/sheismylife >>>>> >>>> >>>>Regards, >>>>Artyom >>>> >>>> >>>>------------------------------------------------------------------------------ >>>>Live Security Virtual Conference >>>>Exclusive live event will cover all the ways today's security and >>>>threat landscape has changed and how IT managers can respond. Discussions >>>>will include endpoint security, mobile security and the latest in malware >>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>> >>>------------------------------------------------------------------------------ >>>Live Security Virtual Conference >>>Exclusive live event will cover all the ways today's security and >>>threat landscape has changed and how IT managers can respond. Discussions >>>will include endpoint security, mobile security and the latest in malware >>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >> >>------------------------------------------------------------------------------ >>Live Security Virtual Conference >>Exclusive live event will cover all the ways today's security and >>threat landscape has changed and how IT managers can respond. Discussions >>will include endpoint security, mobile security and the latest in malware >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2012-09-01 13:24:45
|
I tried you codes the first time. It can't be compiled. $ make Scanning dependencies of target cppweb [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o In file included from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1:0: /home/chenshu/work/kaimei/cppweb/include/groups.h: In static member function ‘static void cppcms::json::traits<kaimei::groups>::set(cppcms::json::value&, const kaimei::groups&)’: /home/chenshu/work/kaimei/cppweb/include/groups.h:39:60: error: invalid initialization of non-const reference of type ‘cppcms::json::array& {aka std::vector<cppcms::json::value>&}’ from an rvalue of type ‘void’ make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 make: *** [all] Error 2 line 39 is : cppcms::json::array &a=v.at("values",cppcms::json::array()); I upgraded CppCMS to latest version, also read your API document. It seems your 'at' member function return 'void' 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 9:15 PM, Artyom Beilis <art...@ya...> wrote: > You hadn't read my code correctly > > cppcms::json::array &a=v.at("values",cppcms::json::array()); > > a is a reference and you fill it. > > Anyway read the cppcms::json::value reference documentation for further > details > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* Artyom Beilis <art...@ya...>; > cpp...@li... > *Sent:* Saturday, September 1, 2012 3:32 PM > > *Subject:* Re: [Cppcms-users] Compile error: traits is not a template > > I changed your codes a bit. > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::groups> { > > static void set(value &v, kaimei::groups const& in) { > v.set("size", in.size()); > cppcms::json::array a; > a.resize(in.values_.size()); > for(size_t i = 0; i < in.values_.size(); i++) { > a[i]=*in.values_[i]; > } > v.set("values", a); > } > }; > > } > } > > Two issues: > 1. This way is not efficient, a lot of deep copy would occur when copying > vector from array. > My original way is very simple, create a stringstream object, groups > object converts all member variables into string, append them to > stringstream. It does not looks elegant, but faster. > 2. It doesn't work. I got an exception: > cppcms::json::bad_cast: error converting from object > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: > > Because shared_ptr<group> is not specialized for traits... > > You need manually create an array and sets its memebers.i.e > > Something like that: > > cppcms::json::array &a=v.at("values",cppcms::json::array()); > a.resize(in.values_.size()); > for(size_t i = 0;i<in.values_.size();i++) > a[i]=*in.values_[i]; > > > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > >________________________________ > > From: 陈抒 <csf...@gm...> > >To: Artyom Beilis <art...@ya...>; > cpp...@li... > >Sent: Saturday, September 1, 2012 10:05 AM > >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > > > > >Thank you. But I see new error. > >groups.h file: > > > > > >#ifndef __GROUPS_H > >#define __GROUPS_H > > > > > >#include <vector> > >#include <boost/shared_ptr.hpp> > >#include "group.h" > > > > > >namespace kaimei{ > > > > > > class groups{ > > public: > > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > > typedef std::vector<boost::shared_ptr<group> >::const_iterator > const_iterator; > > > > > > void add(boost::shared_ptr<group> g); > > > > > > bool empty() const; > > > > > > unsigned int size() const; > > > > > > std::string json_string() const; > > > > friend class cppcms::json::traits<kaimei::groups>; > > > > > > private: > > std::vector<boost::shared_ptr<kaimei::group> > values_; > > }; > > > > > >} > > > > > >namespace cppcms { > > namespace json { > > > > > > template<> > > struct traits<kaimei::groups> { > > > > > > static void set(value &v, kaimei::groups const& in) { > >v.set("size", in.size()); > >v.set("values", in.values_); > > } > > }; > > > > > > } > >} > > > > > >#endif > > > > > > > > > >error message: > > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, > ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, > ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, > ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, > ../../src/view/login.cpp, ../../src/view/group_management.cpp > >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > >In file included from > /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > >/usr/include/cppcms/json.h: In member function ‘void > cppcms::json::value::set_value(const T&) [with T = > boost::shared_ptr<kaimei::group>]’: > >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void > cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const > std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ > >/usr/include/cppcms/json.h:247:4: instantiated from ‘void > cppcms::json::value::set_value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:316:4: instantiated from > ‘cppcms::json::value::value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:352:4: instantiated from ‘void > cppcms::json::value::set(const char*, const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated > from here > >/usr/include/cppcms/json.h:247:4: error: incomplete type > ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested > name specifier > >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > >make: *** [all] Error 2 > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > > > > >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> > wrote: > > > >> > >> > >>>But I got error when compiling another class. It has group.h and > group.cpp file. > >>> > >>> > >>>#ifndef __GROUP_H > >>>#define __GROUP_H > >>> > >>> > >>>#include <string> > >>> > >>> > >>>namespace kaimei{ > >>>... > >> > >>} > >>> > >>> > >>>namespace cppcms { > >>> namespace json { > >>> template<> > >>> struct traits<kaimei::group> { > >>>... > >>> } > >>> } > >>>} > >>> > >>> > >>> > >>> [snip] > >> > >>> > >>>I am not good at template programming. Why did this happen? > >>> > >> > >>You can't specialize undefined struct - you need to include > <cppcms/json.h> > >>header. It provides the original traits struct and than you specialize > it for > >>your type of class > >> > >> > >> > >>> > >>>陈抒 > >>>Best regards > >>>http://blog.csdn.net/sheismylife > >>> > >> > >>Regards, > >>Artyom > >> > >> > > >>------------------------------------------------------------------------------ > >>Live Security Virtual Conference > >>Exclusive live event will cover all the ways today's security and > >>threat landscape has changed and how IT managers can respond. Discussions > >>will include endpoint security, mobile security and the latest in malware > >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >>_______________________________________________ > >>Cppcms-users mailing list > >>Cpp...@li... > >>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > > > > >------------------------------------------------------------------------------ > >Live Security Virtual Conference > >Exclusive live event will cover all the ways today's security and > >threat landscape has changed and how IT managers can respond. Discussions > >will include endpoint security, mobile security and the latest in malware > >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: 陈抒 <csf...@gm...> - 2012-09-01 13:27:24
|
Also, when I said deep copy, I mean the following codes: for(size_t i = 0;i<in.values_.size();i++) a[i]=*in.values_[i]; 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 9:24 PM, 陈抒 <csf...@gm...> wrote: > I tried you codes the first time. It can't be compiled. > > $ make > Scanning dependencies of target cppweb > [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > In file included from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1:0: > /home/chenshu/work/kaimei/cppweb/include/groups.h: In static member > function ‘static void > cppcms::json::traits<kaimei::groups>::set(cppcms::json::value&, const > kaimei::groups&)’: > /home/chenshu/work/kaimei/cppweb/include/groups.h:39:60: error: invalid > initialization of non-const reference of type ‘cppcms::json::array& {aka > std::vector<cppcms::json::value>&}’ from an rvalue of type ‘void’ > make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > make: *** [all] Error 2 > > line 39 is : > cppcms::json::array &a=v.at("values",cppcms::json::array()); > > I upgraded CppCMS to latest version, also read your API document. > It seems your 'at' member function return 'void' > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sat, Sep 1, 2012 at 9:15 PM, Artyom Beilis <art...@ya...> wrote: > >> You hadn't read my code correctly >> >> cppcms::json::array &a=v.at("values",cppcms::json::array()); >> >> a is a reference and you fill it. >> >> Anyway read the cppcms::json::value reference documentation for further >> details >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ >> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> ------------------------------ >> *From:* 陈抒 <csf...@gm...> >> *To:* Artyom Beilis <art...@ya...>; >> cpp...@li... >> *Sent:* Saturday, September 1, 2012 3:32 PM >> >> *Subject:* Re: [Cppcms-users] Compile error: traits is not a template >> >> I changed your codes a bit. >> namespace cppcms { >> namespace json { >> >> template<> >> struct traits<kaimei::groups> { >> >> static void set(value &v, kaimei::groups const& in) { >> v.set("size", in.size()); >> cppcms::json::array a; >> a.resize(in.values_.size()); >> for(size_t i = 0; i < in.values_.size(); i++) { >> a[i]=*in.values_[i]; >> } >> v.set("values", a); >> } >> }; >> >> } >> } >> >> Two issues: >> 1. This way is not efficient, a lot of deep copy would occur when copying >> vector from array. >> My original way is very simple, create a stringstream object, groups >> object converts all member variables into string, append them to >> stringstream. It does not looks elegant, but faster. >> 2. It doesn't work. I got an exception: >> cppcms::json::bad_cast: error converting from object >> >> >> 陈抒 >> Best regards >> http://blog.csdn.net/sheismylife >> >> >> On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...>wrote: >> >> Because shared_ptr<group> is not specialized for traits... >> >> You need manually create an array and sets its memebers.i.e >> >> Something like that: >> >> cppcms::json::array &a=v.at("values",cppcms::json::array()); >> a.resize(in.values_.size()); >> for(size_t i = 0;i<in.values_.size();i++) >> a[i]=*in.values_[i]; >> >> >> >> >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ >> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >> >________________________________ >> > From: 陈抒 <csf...@gm...> >> >To: Artyom Beilis <art...@ya...>; >> cpp...@li... >> >Sent: Saturday, September 1, 2012 10:05 AM >> >Subject: Re: [Cppcms-users] Compile error: traits is not a template >> > >> > >> >Thank you. But I see new error. >> >groups.h file: >> > >> > >> >#ifndef __GROUPS_H >> >#define __GROUPS_H >> > >> > >> >#include <vector> >> >#include <boost/shared_ptr.hpp> >> >#include "group.h" >> > >> > >> >namespace kaimei{ >> > >> > >> > class groups{ >> > public: >> > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; >> > typedef std::vector<boost::shared_ptr<group> >::const_iterator >> const_iterator; >> > >> > >> > void add(boost::shared_ptr<group> g); >> > >> > >> > bool empty() const; >> > >> > >> > unsigned int size() const; >> > >> > >> > std::string json_string() const; >> > >> > friend class cppcms::json::traits<kaimei::groups>; >> > >> > >> > private: >> > std::vector<boost::shared_ptr<kaimei::group> > values_; >> > }; >> > >> > >> >} >> > >> > >> >namespace cppcms { >> > namespace json { >> > >> > >> > template<> >> > struct traits<kaimei::groups> { >> > >> > >> > static void set(value &v, kaimei::groups const& in) { >> >v.set("size", in.size()); >> >v.set("values", in.values_); >> > } >> > }; >> > >> > >> > } >> >} >> > >> > >> >#endif >> > >> > >> > >> > >> >error message: >> > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, >> ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, >> ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, >> ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, >> ../../src/view/login.cpp, ../../src/view/group_management.cpp >> >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >> >In file included from >> /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, >> > from >> /home/chenshu/work/kaimei/cppweb/include/groups.h:6, >> > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >> >/usr/include/cppcms/json.h: In member function ‘void >> cppcms::json::value::set_value(const T&) [with T = >> boost::shared_ptr<kaimei::group>]’: >> >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void >> cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const >> std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >> >/usr/include/cppcms/json.h:247:4: instantiated from ‘void >> cppcms::json::value::set_value(const T&) [with T = >> std::vector<boost::shared_ptr<kaimei::group> >]’ >> >/usr/include/cppcms/json.h:316:4: instantiated from >> ‘cppcms::json::value::value(const T&) [with T = >> std::vector<boost::shared_ptr<kaimei::group> >]’ >> >/usr/include/cppcms/json.h:352:4: instantiated from ‘void >> cppcms::json::value::set(const char*, const T&) [with T = >> std::vector<boost::shared_ptr<kaimei::group> >]’ >> >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated >> from here >> >/usr/include/cppcms/json.h:247:4: error: incomplete type >> ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested >> name specifier >> >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >> >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >> >make: *** [all] Error 2 >> > >> > >> >陈抒 >> >Best regards >> >http://blog.csdn.net/sheismylife >> > >> > >> > >> >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> >> wrote: >> > >> >> >> >> >> >>>But I got error when compiling another class. It has group.h and >> group.cpp file. >> >>> >> >>> >> >>>#ifndef __GROUP_H >> >>>#define __GROUP_H >> >>> >> >>> >> >>>#include <string> >> >>> >> >>> >> >>>namespace kaimei{ >> >>>... >> >> >> >>} >> >>> >> >>> >> >>>namespace cppcms { >> >>> namespace json { >> >>> template<> >> >>> struct traits<kaimei::group> { >> >>>... >> >>> } >> >>> } >> >>>} >> >>> >> >>> >> >>> >> >>> [snip] >> >> >> >>> >> >>>I am not good at template programming. Why did this happen? >> >>> >> >> >> >>You can't specialize undefined struct - you need to include >> <cppcms/json.h> >> >>header. It provides the original traits struct and than you specialize >> it for >> >>your type of class >> >> >> >> >> >> >> >>> >> >>>陈抒 >> >>>Best regards >> >>>http://blog.csdn.net/sheismylife >> >>> >> >> >> >>Regards, >> >>Artyom >> >> >> >> >> >> >>------------------------------------------------------------------------------ >> >>Live Security Virtual Conference >> >>Exclusive live event will cover all the ways today's security and >> >>threat landscape has changed and how IT managers can respond. >> Discussions >> >>will include endpoint security, mobile security and the latest in >> malware >> >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> >>_______________________________________________ >> >>Cppcms-users mailing list >> >>Cpp...@li... >> >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> > >> >> >------------------------------------------------------------------------------ >> >Live Security Virtual Conference >> >Exclusive live event will cover all the ways today's security and >> >threat landscape has changed and how IT managers can respond. Discussions >> >will include endpoint security, mobile security and the latest in malware >> >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> >_______________________________________________ >> >Cppcms-users mailing list >> >Cpp...@li... >> >https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >> > >> > >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > |
From: Artyom B. <art...@ya...> - 2012-09-01 13:57:07
|
I don't remember exact API from the head, try - there are plenty ways to do stuff http://cppcms.com/wikipp/en/page/cppcms_1x_json For example, this works.. std::vector<booster::shared_ptr<int> > vals; vals.push_back(booster::shared_ptr<int>( new int(1))); vals.push_back(booster::shared_ptr<int>( new int(2))); cppcms::json::value v; v["x"]=cppcms::json::array(); cppcms::json::array &a = v["x"].array(); a.resize(vals.size()); for(size_t i = 0;i<vals.size();i++) a[i] = *vals[i]; std::cout << v << std::endl; Also if you don't want to do copy... use cppcms::json::value::swap That not that hard :-) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, September 1, 2012 4:26 PM >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > >Also, when I said deep copy, I mean the following codes: > > >for(size_t i = 0;i<in.values_.size();i++) > a[i]=*in.values_[i]; > > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sat, Sep 1, 2012 at 9:24 PM, 陈抒 <csf...@gm...> wrote: > >I tried you codes the first time. It can't be compiled. >> >> >>$ make >>Scanning dependencies of target cppweb >>[ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >>In file included from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1:0: >>/home/chenshu/work/kaimei/cppweb/include/groups.h: In static member function ‘static void cppcms::json::traits<kaimei::groups>::set(cppcms::json::value&, const kaimei::groups&)’: >>/home/chenshu/work/kaimei/cppweb/include/groups.h:39:60: error: invalid initialization of non-const reference of type ‘cppcms::json::array& {aka std::vector<cppcms::json::value>&}’ from an rvalue of type ‘void’ >>make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >>make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >>make: *** [all] Error 2 >> >> >>line 39 is : >>cppcms::json::array &a=v.at("values",cppcms::json::array()); >> >> >>I upgraded CppCMS to latest version, also read your API document. >>It seems your 'at' member function return 'void' >> >>陈抒 >>Best regards >>http://blog.csdn.net/sheismylife >> >> >> >>On Sat, Sep 1, 2012 at 9:15 PM, Artyom Beilis <art...@ya...> wrote: >> >>You hadn't read my code correctly >>> >>> >>>cppcms::json::array &a=v.at("values",cppcms::json::array()); >>> >>> >>>a is a reference and you fill it. >>> >>> >>>Anyway read the cppcms::json::value reference documentation for further details >>> >>> >>>Artyom Beilis >>>-------------- >>>CppCMS - C++ Web Framework: http://cppcms.com/ >>>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>> >>> >>> >>>>________________________________ >>>> From: 陈抒 <csf...@gm...> >>>>To: Artyom Beilis <art...@ya...>; cpp...@li... >>>>Sent: Saturday, September 1, 2012 3:32 PM >>>> >>>>Subject: Re: [Cppcms-users] Compile error: traits is not a template >>>> >>>> >>>> >>>>I changed your codes a bit. >>>>namespace cppcms { >>>> namespace json { >>>> >>>> >>>> template<> >>>> struct traits<kaimei::groups> { >>>> >>>> >>>> static void set(value &v, kaimei::groups const& in) { >>>>v.set("size", in.size()); >>>>cppcms::json::array a; >>>>a.resize(in.values_.size()); >>>>for(size_t i = 0; i < in.values_.size(); i++) { >>>> a[i]=*in.values_[i]; >>>>} >>>>v.set("values", a); >>>> } >>>> }; >>>> >>>> >>>> } >>>>} >>>> >>>> >>>>Two issues: >>>>1. This way is not efficient, a lot of deep copy would occur when copying vector from array. >>>>My original way is very simple, create a stringstream object, groups object converts all member variables into string, append them to stringstream. It does not looks elegant, but faster. >>>>2. It doesn't work. I got an exception: >>>>cppcms::json::bad_cast: error converting from object >>>> >>>> >>>>陈抒 >>>>Best regards >>>>http://blog.csdn.net/sheismylife >>>> >>>> >>>> >>>>On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: >>>> >>>>Because shared_ptr<group> is not specialized for traits... >>>>> >>>>>You need manually create an array and sets its memebers.i.e >>>>> >>>>>Something like that: >>>>> >>>>>cppcms::json::array &a=v.at("values",cppcms::json::array()); >>>>>a.resize(in.values_.size()); >>>>>for(size_t i = 0;i<in.values_.size();i++) >>>>> a[i]=*in.values_[i]; >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>Artyom Beilis >>>>>-------------- >>>>>CppCMS - C++ Web Framework: http://cppcms.com/ >>>>>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>>>> >>>>> >>>>> >>>>>>________________________________ >>>>>> From: 陈抒 <csf...@gm...> >>>>>>To: Artyom Beilis <art...@ya...>; cpp...@li... >>>>>>Sent: Saturday, September 1, 2012 10:05 AM >>>>>>Subject: Re: [Cppcms-users] Compile error: traits is not a template >>>>> >>>>>> >>>>>> >>>>>>Thank you. But I see new error. >>>>>>groups.h file: >>>>>> >>>>>> >>>>>>#ifndef __GROUPS_H >>>>>>#define __GROUPS_H >>>>>> >>>>>> >>>>>>#include <vector> >>>>>>#include <boost/shared_ptr.hpp> >>>>>>#include "group.h" >>>>>> >>>>>> >>>>>>namespace kaimei{ >>>>>> >>>>>> >>>>>> class groups{ >>>>>> public: >>>>>> typedef std::vector<boost::shared_ptr<group> >::iterator iterator; >>>>>> typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; >>>>>> >>>>>> >>>>>> void add(boost::shared_ptr<group> g); >>>>>> >>>>>> >>>>>> bool empty() const; >>>>>> >>>>>> >>>>>> unsigned int size() const; >>>>>> >>>>>> >>>>>> std::string json_string() const; >>>>>> >>>>>> friend class cppcms::json::traits<kaimei::groups>; >>>>>> >>>>>> >>>>>> private: >>>>>> std::vector<boost::shared_ptr<kaimei::group> > values_; >>>>>> }; >>>>>> >>>>>> >>>>>>} >>>>>> >>>>>> >>>>>>namespace cppcms { >>>>>> namespace json { >>>>>> >>>>>> >>>>>> template<> >>>>>> struct traits<kaimei::groups> { >>>>>> >>>>>> >>>>>> static void set(value &v, kaimei::groups const& in) { >>>>>>v.set("size", in.size()); >>>>>>v.set("values", in.values_); >>>>>> } >>>>>> }; >>>>>> >>>>>> >>>>>> } >>>>>>} >>>>>> >>>>>> >>>>>>#endif >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>error message: >>>>>> 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp >>>>>>[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >>>>>>In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, >>>>>> from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, >>>>>> from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >>>>>>/usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: >>>>>>/usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >>>>>>/usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>>>>/usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>>>>/usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>>>>/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here >>>>>>/usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier >>>>>>make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >>>>>>make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >>>>>>make: *** [all] Error 2 >>>>>> >>>>>> >>>>>>陈抒 >>>>>>Best regards >>>>>>http://blog.csdn.net/sheismylife >>>>>> >>>>>> >>>>>> >>>>>>On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>>>But I got error when compiling another class. It has group.h and group.cpp file. >>>>>>>> >>>>>>>> >>>>>>>>#ifndef __GROUP_H >>>>>>>>#define __GROUP_H >>>>>>>> >>>>>>>> >>>>>>>>#include <string> >>>>>>>> >>>>>>>> >>>>>>>>namespace kaimei{ >>>>>>>>... >>>>>>> >>>>>>>} >>>>>>>> >>>>>>>> >>>>>>>>namespace cppcms { >>>>>>>> namespace json { >>>>>>>> template<> >>>>>>>> struct traits<kaimei::group> { >>>>>>>>... >>>>>>>> } >>>>>>>> } >>>>>>>>} >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> [snip] >>>>>>> >>>>>>>> >>>>>>>>I am not good at template programming. Why did this happen? >>>>>>>> >>>>>>> >>>>>>>You can't specialize undefined struct - you need to include <cppcms/json.h> >>>>>>>header. It provides the original traits struct and than you specialize it for >>>>>>>your type of class >>>>>>> >>>>>>> >>>>>>> >>>>>>>> >>>>>>>>陈抒 >>>>>>>>Best regards >>>>>>>>http://blog.csdn.net/sheismylife >>>>>>>> >>>>>>> >>>>>>>Regards, >>>>>>>Artyom >>>>>>> >>>>>>> >>>>>>>------------------------------------------------------------------------------ >>>>>>>Live Security Virtual Conference >>>>>>>Exclusive live event will cover all the ways today's security and >>>>>>>threat landscape has changed and how IT managers can respond. Discussions >>>>>>>will include endpoint security, mobile security and the latest in malware >>>>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>_______________________________________________ >>>>>>>Cppcms-users mailing list >>>>>>>Cpp...@li... >>>>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>>>> >>>>>> >>>>>>------------------------------------------------------------------------------ >>>>>>Live Security Virtual Conference >>>>>>Exclusive live event will cover all the ways today's security and >>>>>>threat landscape has changed and how IT managers can respond. Discussions >>>>>>will include endpoint security, mobile security and the latest in malware >>>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>_______________________________________________ >>>>>>Cppcms-users mailing list >>>>>>Cpp...@li... >>>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>>> >>>>>> >>>>>> >>>>> >>>>>------------------------------------------------------------------------------ >>>>>Live Security Virtual Conference >>>>>Exclusive live event will cover all the ways today's security and >>>>>threat landscape has changed and how IT managers can respond. Discussions >>>>>will include endpoint security, mobile security and the latest in malware >>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>_______________________________________________ >>>>>Cppcms-users mailing list >>>>>Cpp...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>> >>>> >>>>------------------------------------------------------------------------------ >>>>Live Security Virtual Conference >>>>Exclusive live event will cover all the ways today's security and >>>>threat landscape has changed and how IT managers can respond. Discussions >>>>will include endpoint security, mobile security and the latest in malware >>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>>> >>>> >>>------------------------------------------------------------------------------ >>>Live Security Virtual Conference >>>Exclusive live event will cover all the ways today's security and >>>threat landscape has changed and how IT managers can respond. Discussions >>>will include endpoint security, mobile security and the latest in malware >>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >> > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |