File indexing completed on 2023-03-17 10:39:06
0001 #ifndef GENERS_COLUMNBUFFER_HH_
0002 #define GENERS_COLUMNBUFFER_HH_
0003
0004 #include <iostream>
0005 #include <vector>
0006
0007 #include "Alignment/Geners/interface/CharBuffer.hh"
0008 #include "Alignment/Geners/interface/ClassId.hh"
0009
0010 namespace gs {
0011 namespace Private {
0012 struct ColumnBuffer {
0013 inline ColumnBuffer() : firstrow(0), lastrowp1(0), podsize(0) {}
0014
0015
0016 CharBuffer buf;
0017
0018
0019 unsigned long firstrow;
0020 unsigned long lastrowp1;
0021
0022
0023
0024 unsigned long podsize;
0025
0026
0027
0028
0029
0030 std::vector<std::streampos> offsets;
0031
0032
0033 bool write(std::ostream &os) const;
0034 inline const ClassId &classId() const { return static_classId(); }
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 static void restore(const ClassId &id, const ClassId &charBufId, std::istream &in, ColumnBuffer *buf);
0045
0046 static inline const char *classname() { return "gs::Private::ColumnBuffer"; }
0047 static inline unsigned version() { return 1; }
0048
0049 bool operator==(const ColumnBuffer &r) const;
0050 inline bool operator!=(const ColumnBuffer &r) const { return !(*this == r); }
0051
0052 private:
0053 static const ClassId &static_classId();
0054 };
0055 }
0056 }
0057
0058 #endif