Open source C++ Utility data Export/Import


You can clone CCEXP with MVECTOR:

or use MVECTOR later if need:

CCEXP Presentation

You can take a look at CCEPX presentation video at this vimeo link!

What is CCEXP ?

CCEXP (Class C EXPort) is a library in C++, based on templates and standard C/C++ libraries and functions, for organized data extraction and sharing between C++ code and other software (i.e. MatLab/Octave, Python etc). The sharing is currently done via files, which can store large amount of data.

Why should I use CCEXP ?

  • Data Export / Analysis / Debugging
  • Data Sharing in different platforms (C++, MatLab/Octave, Python)

Data Export / Analysis / Debugging

You make a piece of code and need to export different runtime values and data that are going to be analyzed in another software (i.e. MatLab/Octave, Python etc). Instead of writing down your own code using fopen/fstream etc, you can just include the CCEXP.hpp and CCEXP.cpp files in your project and use them, for exporting multiple different types of data in an organized form.

An example:

At MatLab/Octave you can read and check if everything is ok, as:

And what if you need to stop exporting the ‘Image’ table (because the camera’s data are ok, and you don’t need anymore those data)?… With CCEXP you can ignore or not easily each Table:

Data Sharing in different platforms (C++, MatLab/Octave, Python)

CCEXP is a very good tool, if you need to exchange exported data from C++ to another collaborator which works in any (supported) language. The CCEXP I/O system is hidden to clients, thus as far as all collaborators understand the data organizaton of CCEXP (Files, Tables(of different types), Rows and Colums) and the relative API in each language, the data can be shared easily between the different platforms.

Below an analytical example of data sharing from a MatLab/Octave script is given, following by an example of C++ data import to a program.

The “SharedData.ccexp” file can now be shared with a C++ program and loaded as follows:


CCEXP is now based on the MVECTOR library, as std::vector library may or may not work the same in all libraries.
MVECTOR library also can track allocated memory. More info about MVECTOR can be found here:

Build with CMAKE

You can clone CCEXP with MVECTOR:

Then build like:


Using CCEXP Version 0.068, users can find at the folder /C++/test/CCEXPViewer/ a simple C++ demo example which creates an .exe to display .ccexp files data. The code is given here too.
The macro __CCEXP_PRINT_TABLES__ is just an example macro on how to use the new Analyze() functions of CCEXP.


CCEXPGet example is a tool, that can be modified/compiled and used directly to extract rows of CCEXP arrays from command-line.