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@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk