9#ifndef IMPNPCTRANSPORT_AVRO2PB_READER_H
10#define IMPNPCTRANSPORT_AVRO2PB_READER_H
12#include <IMP/npctransport/avro.h>
13#include <IMP/npctransport/AvroDataFileData.h>
19IMP_GCC_PUSH_POP(diagnostic push)
20IMP_GCC_PRAGMA(diagnostic ignored
"-Wextra")
22IMP_GCC_PUSH_POP(diagnostic pop)
28IMPNPCTRANSPORT_BEGIN_NAMESPACE
30class IMPNPCTRANSPORTEXPORT Avro2PBReader {
32 typedef IMP_NPCTRANSPORT_AVRO_NAMESPACE::DataFileReader<IMP_npctransport::wrapper> t_avro_reader;
38 Avro2PBReader(
const Strings& avro_filenames);
43 Avro2PBReader(std::string avro_filename);
48#if defined(SWIG) || defined(IMP_SWIG_WRAPPER)
49 typedef std::string ByteBuffer;
50 ByteBuffer read_next();
57 std::string read_next();
66 std::string get_cur_file_name() {
67 if (!get_is_valid())
return "";
68 return avro_filenames_[cur_file_];
73 void advance_current_reader();
77 void init(
const Strings& avro_filenames);
81 t_avro_reader* avro_reader_;
82 unsigned int cur_file_;
86 out <<
"Avro2PBReader with " << avro_filenames_.size()
87 <<
" input avro files");
92IMPNPCTRANSPORT_END_NAMESPACE
IMP::Vector< Avro2PBReader > Avro2PBReaders
IMP::Vector< String > Strings
Standard way to pass a bunch of String values.
Macros to help with objects that can be printed to a stream.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Macros to help in implementing Value objects.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.