YAML seems like a great format for configuration files & data binding persistent objects in human-readable form...
Is there a C++ library that handles YAML? Does Boost::Serialization have plans for a YAML option?
EDIT: I would prefer an OO library.
A quick search gave me this: yaml-cpp
Try the YAML component from the BOOST vault serialization library.
EDIT 2014: A recent development, https://groups.google.com/d/msg/boost-devel-archive/mhT7qIh1nsI/uXAuXFAWrxQJ
EDIT 2019: Didn't try it yet, but this seems to be a serious take: https://github.com/rwols/yaml-archive
I found this, please if you use it let me know how it did it for you and post some example if possible,
https://code.google.com/p/google-summer-of-code-2008-boost/downloads/list
UPDATED link (as 2014), it seems to point to the same files as the BOOST vault answer.
Related
I'm new to the Fix protocol and I've been trying to find a way to implement it into c++ files starting from a XML description file. So by searching on the net they recommended me with Quickfix, what I really want to know is what do we should call QuickFix? A library or a standard or what exactly?
But my main problem is that lately I downloaded the Quickfix package then I couldn't integrate it into my c++ project even with the QuickFix documentation ( which was vague by the way !) so can someone please describe to me exactly step by step how to configure QuickFix with My Visual c++ project and how can I eventually write this code to parse my XML file:
#include "Application.h"
#include "quickfix/Session.h"
Quickfix doesn't understand XML or parses XML, except for the message bank config file which is in XML. It only deals in FIX formatted strings. You have to use a XML parser i.e. xerces, libxml++ to extract your data in the XML file and then construct a FIX message using the Quickfix library and send wherever you want to.
Fiximate is a more user friendly place to check your FIX messages for correctness. There are examples in the Quickfix library to test an application, and you would need a config file to run it, examples are provided on the Quickfix website.
FIX is a standard: fixprotocol.org/specifications
QuickFIX is a FIX engine (c.f. Library) implementing the standard.
In the source files that you downloaded there is a set of examples which you can use to understand the operation of the engine. You should use these along side the documentation.
QuickFix is a library. There are other FIX engines also available.
It simplifies the implementation by taking care of many low-level things. All a developer has to do is enhance the APIs for messages.
There are good examples for a quick start and good documentation for a beginner.
To get into more details of QuickFix, code itself is well organized.
I'm working on a Qt application where we have to read in zipped files or QByteArrays and unzip them in memory, reading the file contents without actually unzipping the file to disk.
Is there a good sdk that can enable this easily? We currently use QArchive (bugless), but we have found it to anything but bugless and are looking to move to a different solution.
Any advice is appreciated.
Thanks,
Liron
Have a look at Minizip that is included in the contrib section of zlib. It is very simple, but does the job well. More recent versions look like they handle passwords.
We ended up going with quazip. Thanks Eugen.
Seems to be working well.
Take a look at http://www.7-zip.org/sdk.html. It's licensed under public domain.
somewhere, I found a simple source to read something, and that source includes
"PkunZip.cpp" and "Pkunzip.h" to read zip-file.
However, I could not find the website about PkunZip.cpp ( sourceforge or codeproject etc ).
where can I find the website that describe 'pkunzip.cpp' and a manual about it?
If you search google for either of these files nothing is returned. That is a pretty bad sign. If you need code to handle zip archives, I have used libarchive in the past with great success. Their website has great documentation and the code is cross platform (Windows, *BSD, Linux, etc).
You should be able to replace any missing functionality with libarchive.
The standard way of reading zip files is zlib, or considering you tagged c++, the zipios. But if you want your particular files, have you tried Google Codesearch?
I thought there was a boost library that allowed me to parse unix conf files?
I believe it also had other features, i.e. it could parse windows ini files and I think XML based config files might have been done or was on the way too.
Any idea what that's called? I'm looking through the program options library and it doesn't look like the library documentation that I was looking to use just a couple of weeks ago.
EDIT: Ok, I think it's might have been the program options library, but I think I might have been looking at other documentation examples... maybe the tutorials.
Can someone point me in the direction of a complete tutorial to read a conf file?
EDIT: Found it. The Boost Property Tree library that I was looking for!
Boost allows you to parse several configuration file formats; this facility is part of Boost.ProgramOptions.
All the answers on this page are good.
The specific library in boost I was after is called the Property Tree. However, I will point out that his is a relatively new feature and only available since the last one or two revisions. My default boost installation in Kubuntu 10.04.1 doesn't have it, so I had to download the boost library and build it myself.
You're maybe looking for Spirit
This time I want to implement Sphinx in Linux. Please give me the API required to do the same or the concerned link will also do. Although I found many for PHP, however none for C++.
I have also used GTKmm in my application.
There is no API to do this. Sphinx will process text files in reStructuredText format and turn them into documentation. The ability to extract documentation from source code is only present for python code. For other languages you will need to put the documentation in the reStructuredText files directly. Do not be confused by the added C/C++/etc. support in Sphinx 1.0: this only covers new reStructeredText directives to better format (and index) documentation regarding non-python code.
It is theoretically possible to use a tool like Doxygen to extract documentation from C++ sources and use that in Sphinx, but this requires custom tools. Breathe may be one such tool.
Here is the resource that pretty much explains everything step-by-step that is needed to build a C/C++ source tree to show up with Sphinx documentation.
https://devblogs.microsoft.com/cppblog/clear-functional-c-documentation-with-sphinx-breathe-doxygen-cmake/
A brief of the pipeline: Doxygen -> Breathe -> Exhale -> Sphinx