9 #ifndef IMPNPCTRANSPORT_AVRO2PB_READER_H
10 #define IMPNPCTRANSPORT_AVRO2PB_READER_H
12 #include <IMP/npctransport/avro.h>
13 #include <IMP/npctransport/AvroDataFileData.h>
19 IMP_GCC_PUSH_POP(diagnostic push)
20 IMP_GCC_PRAGMA(diagnostic ignored
"-Wextra")
21 #include <DataFile.hh>
22 IMP_GCC_PUSH_POP(diagnostic pop)
28 IMPNPCTRANSPORT_BEGIN_NAMESPACE
30 class 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");
92 IMPNPCTRANSPORT_END_NAMESPACE
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
IMP::Vector< String > Strings
Standard way to pass a bunch of String values.
A more IMP-like version of the std::vector.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Macros to help in implementing Value objects.
Macros to help with objects that can be printed to a stream.