You are a guest. Restricted access. Read more.
Command disabled: backlink
SCaVis manual

Input/output in C++

You will need CBook package if you want:

  • Create a file with all jhplot data containers using a C++ program. This file is written using Googl's Protocol Buffers file which can be understood by the PFile Java class
  • Create a data record which can be loaded into a Java program.

PFile class writes and reads all jhplot objects using a protocol buffers template file which is located in the directory “macros/system/HRecord.proto”. This file was used to generate Java and C++ code as:

protoc --java_out=src               HRecord.proto
protoc --cpp_out=CBook/src/HRecord  HRecord.proto

C++ header file is located in the CBook package, while the corresponding Java class located in package. The PFile Java class is directly based on

Try to generate a file with the extension pbu from C++ program and read it using SCaVis. Go to the directory “CBook/doc/example_pbook” compile and run it. It creates a protocol buffers file with several histograms. Then use the Jython scripts located in this directory and run it using SCaVis.

In fact, you can do much more than this. You can write an arbitrary data structure in a C++ and read it using Java. Look at the directory “doc/example_epbook” to get an idea.

man/io/io_advanced.txt · Last modified: 2013/05/31 16:11 (external edit)
CC Attribution-Share Alike 3.0 Unported
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5