File indexing completed on 2024-09-07 04:34:30
0001 #ifndef GENERS_ABSRECORD_HH_
0002 #define GENERS_ABSRECORD_HH_
0003
0004 #include "Alignment/Geners/interface/ItemDescriptor.hh"
0005
0006 namespace gs {
0007 class AbsArchive;
0008 class AbsRecord;
0009 }
0010
0011 gs::AbsArchive &operator<<(gs::AbsArchive &ar, const gs::AbsRecord &record);
0012
0013 namespace gs {
0014 class AbsRecord : public ItemDescriptor {
0015 public:
0016 inline ~AbsRecord() override {}
0017
0018
0019
0020
0021
0022 inline unsigned long long id() const { return itemId_; }
0023
0024
0025
0026 inline unsigned long long itemLength() const { return itemLength_; }
0027
0028 protected:
0029 inline AbsRecord() : ItemDescriptor(), itemId_(0), itemLength_(0) {}
0030 inline AbsRecord(const ClassId &classId, const char *ioPrototype, const char *name, const char *category)
0031 : ItemDescriptor(classId, ioPrototype, name, category), itemId_(0), itemLength_(0) {}
0032
0033 private:
0034 friend gs::AbsArchive & ::operator<<(gs::AbsArchive & ar, const gs::AbsRecord & record);
0035
0036
0037
0038 virtual bool writeData(std::ostream &os) const = 0;
0039
0040 mutable unsigned long long itemId_;
0041 mutable unsigned long long itemLength_;
0042 };
0043 }
0044
0045 #endif