C++ API for BaseX v0.0

Wednesday, 8 January 2014 · 5 messages · last reply 10 Jan 2014
JM
jean-marc Mercier8 Jan 2014 15:13 #
Hi all, C++ users could be interested in this first "quick and dirty" version of a C++ API for BaseX, located at https://github.com/JohnLeM/BaseXCPPAPI. Even if this v0.0 version is built upon Visual C++ 2012 Express, the C++ code should be multi platform. Hence, if there is any C++ / Unix / gcc BaseX users, do not hesitate to ask for a make file. To BaseX team : you could also be interested to including a cleaner version of this work to your API set for your C++ clients. This API is built upon : - boost::asio libray for the TCP connector (http://www.boost.org/) - PugiXML (https://code.google.com/p/pugixml/) for a lightweight C++ parser with XPATH 1.0 support. The provided example is a simple construction of an integer list. Cheers Jean-Marc
DK
Dirk Kirsten8 Jan 2014 16:38 #
Hi Jean-Marc, I did take a (very) quick look at it. However, I failed to compile this on my linux machine using gcc. Some thoughts: - PugiXML seems to be used just for the example, I guess (because requiring another XPath processor to connect to BaseX would be weird). Seems easier to me to simplify the example and just execute a simple XQuery without relying on PugiXML - You use TCHAR, this seems to be windows specific. - std::wstring_convert isn't supported by gcc, it seems - It would be really nice to have a simply Makefile - Please be careful with case-sensitivity. BasexClient.h and BaseXClient.h aren't the same using a case-sensitive file system. In general, I think it would be very beneficial for BaseX to have an C++ client which compiles on every major platform. So we might want to add a more polished version of your connector to the official BaseX release. However, as already mentioned, there still seems to be some work to do and I am not sure anyone in the BaseX core team has any particular C++ skills ... so every outside contribution is (as always) more than welcome. Cheers, Dirk
Quoted text · jean-marc Mercier · 31 lines
On 08/01/14 15:13, jean-marc Mercier wrote: > Hi all, > > C++ users could be interested in this first "quick and dirty" version of a > C++ API for BaseX, located at https://github.com/JohnLeM/BaseXCPPAPI. Even > if this v0.0 version is built upon Visual C++ 2012 Express, the C++ code > should be multi platform. Hence, if there is any C++ / Unix / gcc BaseX > users, do not hesitate to ask for a make file. > > To BaseX team : you could also be interested to including a cleaner version > of this work to your API set for your C++ clients. > > This API is built upon : > > - boost::asio libray for the TCP connector (http://www.boost.org/) > - PugiXML (https://code.google.com/p/pugixml/) for a lightweight C++ parser > with XPATH 1.0 support. > > The provided example is a simple construction of an integer list. > > Cheers > > Jean-Marc > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
-- Dirk Kirsten, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
JM
jean-marc Mercier9 Jan 2014 11:21 #
Hi Dirk, I am currently trying to compile this project with GCC / MINGW under eclipse. With eclipse, I should be able to provide a unix compatible makefile. Once produced, could you be kind enough to test ? To answer your thoughts : - PugiXML (or any C++ library with XPATH support) is a very efficient way to bind C++ with XML. It seems natural to provide an example using it. I'll provide also a very simple example without. - std::wstring_convert. It is necessary for utf8 support, but you're right, it seems not to be supported. I removed all references to it, but there will not be any utf8 support. Cheers Jean-Marc 2014/1/8 Dirk Kirsten <dk at basex.org>
Quoted text · Dirk Kirsten · 68 lines
> Hi Jean-Marc, > > I did take a (very) quick look at it. However, I failed to compile this > on my linux machine using gcc. Some thoughts: > > - PugiXML seems to be used just for the example, I guess (because > requiring another XPath processor to connect to BaseX would be weird). > Seems easier to me to simplify the example and just execute a simple > XQuery without relying on PugiXML > - You use TCHAR, this seems to be windows specific. > - std::wstring_convert isn't supported by gcc, it seems > - It would be really nice to have a simply Makefile > - Please be careful with case-sensitivity. BasexClient.h and > BaseXClient.h aren't the same using a case-sensitive file system. > > In general, I think it would be very beneficial for BaseX to have an C++ > client which compiles on every major platform. So we might want to add a > more polished version of your connector to the official BaseX release. > However, as already mentioned, there still seems to be some work to do > and I am not sure anyone in the BaseX core team has any particular C++ > skills ... so every outside contribution is (as always) more than welcome. > > Cheers, > Dirk > > On 08/01/14 15:13, jean-marc Mercier wrote: > > Hi all, > > > > C++ users could be interested in this first "quick and dirty" version of > a > > C++ API for BaseX, located at https://github.com/JohnLeM/BaseXCPPAPI. > Even > > if this v0.0 version is built upon Visual C++ 2012 Express, the C++ code > > should be multi platform. Hence, if there is any C++ / Unix / gcc BaseX > > users, do not hesitate to ask for a make file. > > > > To BaseX team : you could also be interested to including a cleaner > version > > of this work to your API set for your C++ clients. > > > > This API is built upon : > > > > - boost::asio libray for the TCP connector (http://www.boost.org/) > > - PugiXML (https://code.google.com/p/pugixml/) for a lightweight C++ > parser > > with XPATH 1.0 support. > > > > The provided example is a simple construction of an integer list. > > > > Cheers > > > > Jean-Marc > > > > > > > > _______________________________________________ > > BaseX-Talk mailing list > > BaseX-Talk at mailman.uni-konstanz.de > > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > > > -- > Dirk Kirsten, BaseX GmbH, http://basex.org > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >
DK
Dirk Kirsten9 Jan 2014 11:23 #
Hi Jean-Marc, sure, I am happy to test. Cheers, Dirk
Quoted text · jean-marc Mercier · 92 lines
On 09/01/14 11:21, jean-marc Mercier wrote: > Hi Dirk, > > I am currently trying to compile this project with GCC / MINGW under > eclipse. With eclipse, I should be able to provide a unix compatible > makefile. Once produced, could you be kind enough to test ? > > To answer your thoughts : > - PugiXML (or any C++ library with XPATH support) is a very efficient way > to bind C++ with XML. It seems natural to provide an example using it. I'll > provide also a very simple example without. > - std::wstring_convert. It is necessary for utf8 support, but you're right, > it seems not to be supported. I removed all references to it, but there > will not be any utf8 support. > > Cheers > > Jean-Marc > > > > 2014/1/8 Dirk Kirsten <dk at basex.org> > >> Hi Jean-Marc, >> >> I did take a (very) quick look at it. However, I failed to compile this >> on my linux machine using gcc. Some thoughts: >> >> - PugiXML seems to be used just for the example, I guess (because >> requiring another XPath processor to connect to BaseX would be weird). >> Seems easier to me to simplify the example and just execute a simple >> XQuery without relying on PugiXML >> - You use TCHAR, this seems to be windows specific. >> - std::wstring_convert isn't supported by gcc, it seems >> - It would be really nice to have a simply Makefile >> - Please be careful with case-sensitivity. BasexClient.h and >> BaseXClient.h aren't the same using a case-sensitive file system. >> >> In general, I think it would be very beneficial for BaseX to have an C++ >> client which compiles on every major platform. So we might want to add a >> more polished version of your connector to the official BaseX release. >> However, as already mentioned, there still seems to be some work to do >> and I am not sure anyone in the BaseX core team has any particular C++ >> skills ... so every outside contribution is (as always) more than welcome. >> >> Cheers, >> Dirk >> >> On 08/01/14 15:13, jean-marc Mercier wrote: >>> Hi all, >>> >>> C++ users could be interested in this first "quick and dirty" version of >> a >>> C++ API for BaseX, located at https://github.com/JohnLeM/BaseXCPPAPI. >> Even >>> if this v0.0 version is built upon Visual C++ 2012 Express, the C++ code >>> should be multi platform. Hence, if there is any C++ / Unix / gcc BaseX >>> users, do not hesitate to ask for a make file. >>> >>> To BaseX team : you could also be interested to including a cleaner >> version >>> of this work to your API set for your C++ clients. >>> >>> This API is built upon : >>> >>> - boost::asio libray for the TCP connector (http://www.boost.org/) >>> - PugiXML (https://code.google.com/p/pugixml/) for a lightweight C++ >> parser >>> with XPATH 1.0 support. >>> >>> The provided example is a simple construction of an integer list. >>> >>> Cheers >>> >>> Jean-Marc >>> >>> >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >> >> -- >> Dirk Kirsten, BaseX GmbH, http://basex.org >> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz >> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: >> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle >> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >> >
-- Dirk Kirsten, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
JM
jean-marc Mercier10 Jan 2014 17:50 #
Dirk, Hi. I just succeeded in compiling a first version with Cygwin compiler support (i.e. 100%unix compiler), and made it work under a windows machine. Could you try to compile and test it with a unix based one ? Thanks. There will probably be errors, let discuss them. You should fin at https://github.com/JohnLeM/BaseXCPPAPI the resulting first trial. Note : - there are now two project. One is for VS2012 compiler, located in /VS2012 - the other is a first trial, for a third-eye check (you). You should find a auto-generated (debug) makefile at root. Cheers, Jean-Marc 2014/1/9 Dirk Kirsten <dk at basex.org>
Quoted text · Dirk Kirsten · 112 lines
> Hi Jean-Marc, > > sure, I am happy to test. > > Cheers, > Dirk > > On 09/01/14 11:21, jean-marc Mercier wrote: > > Hi Dirk, > > > > I am currently trying to compile this project with GCC / MINGW under > > eclipse. With eclipse, I should be able to provide a unix compatible > > makefile. Once produced, could you be kind enough to test ? > > > > To answer your thoughts : > > - PugiXML (or any C++ library with XPATH support) is a very efficient way > > to bind C++ with XML. It seems natural to provide an example using it. > I'll > > provide also a very simple example without. > > - std::wstring_convert. It is necessary for utf8 support, but you're > right, > > it seems not to be supported. I removed all references to it, but there > > will not be any utf8 support. > > > > Cheers > > > > Jean-Marc > > > > > > > > 2014/1/8 Dirk Kirsten <dk at basex.org> > > > >> Hi Jean-Marc, > >> > >> I did take a (very) quick look at it. However, I failed to compile this > >> on my linux machine using gcc. Some thoughts: > >> > >> - PugiXML seems to be used just for the example, I guess (because > >> requiring another XPath processor to connect to BaseX would be weird). > >> Seems easier to me to simplify the example and just execute a simple > >> XQuery without relying on PugiXML > >> - You use TCHAR, this seems to be windows specific. > >> - std::wstring_convert isn't supported by gcc, it seems > >> - It would be really nice to have a simply Makefile > >> - Please be careful with case-sensitivity. BasexClient.h and > >> BaseXClient.h aren't the same using a case-sensitive file system. > >> > >> In general, I think it would be very beneficial for BaseX to have an C++ > >> client which compiles on every major platform. So we might want to add a > >> more polished version of your connector to the official BaseX release. > >> However, as already mentioned, there still seems to be some work to do > >> and I am not sure anyone in the BaseX core team has any particular C++ > >> skills ... so every outside contribution is (as always) more than > welcome. > >> > >> Cheers, > >> Dirk > >> > >> On 08/01/14 15:13, jean-marc Mercier wrote: > >>> Hi all, > >>> > >>> C++ users could be interested in this first "quick and dirty" version > of > >> a > >>> C++ API for BaseX, located at https://github.com/JohnLeM/BaseXCPPAPI. > >> Even > >>> if this v0.0 version is built upon Visual C++ 2012 Express, the C++ > code > >>> should be multi platform. Hence, if there is any C++ / Unix / gcc BaseX > >>> users, do not hesitate to ask for a make file. > >>> > >>> To BaseX team : you could also be interested to including a cleaner > >> version > >>> of this work to your API set for your C++ clients. > >>> > >>> This API is built upon : > >>> > >>> - boost::asio libray for the TCP connector (http://www.boost.org/) > >>> - PugiXML (https://code.google.com/p/pugixml/) for a lightweight C++ > >> parser > >>> with XPATH 1.0 support. > >>> > >>> The provided example is a simple construction of an integer list. > >>> > >>> Cheers > >>> > >>> Jean-Marc > >>> > >>> > >>> > >>> _______________________________________________ > >>> BaseX-Talk mailing list > >>> BaseX-Talk at mailman.uni-konstanz.de > >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >>> > >> > >> -- > >> Dirk Kirsten, BaseX GmbH, http://basex.org > >> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > >> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > >> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > >> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 > >> > > > > -- > Dirk Kirsten, BaseX GmbH, http://basex.org > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >

⚡Generated with XQuery