Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:18

0001 #ifndef GENERS_CHARBUFFER_HH_
0002 #define GENERS_CHARBUFFER_HH_
0003 
0004 #include <iostream>
0005 
0006 #include "Alignment/Geners/interface/CStringBuf.hh"
0007 #include "Alignment/Geners/interface/ClassId.hh"
0008 
0009 namespace gs {
0010   class CharBuffer : public std::basic_iostream<char> {
0011   public:
0012     inline CharBuffer() { this->init(&buf_); }
0013 
0014     unsigned long size() const;
0015 
0016     inline ClassId classId() const { return ClassId(*this); }
0017     bool write(std::ostream &of) const;
0018 
0019     static inline const char *classname() { return "gs::CharBuffer"; }
0020     static inline unsigned version() { return 1; }
0021     static void restore(const ClassId &id, std::istream &in, CharBuffer *buf);
0022 
0023     bool operator==(const CharBuffer &r) const;
0024     inline bool operator!=(const CharBuffer &r) const { return !(*this == r); }
0025 
0026   private:
0027     CStringBuf buf_;
0028   };
0029 }  // namespace gs
0030 
0031 #endif  // GENERS_CHARBUFFER_HH_