Belle II Software development
Reader.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#ifndef _Belle2_Reader_hh
9#define _Belle2_Reader_hh
10
11#include <cstddef>
12#include <string>
13
14namespace Belle2 {
20 class Serializable;
21
22 class Reader {
23
24 public:
25 virtual ~Reader() {}
26
27 public:
28 virtual size_t read(void*, size_t) = 0;
29 virtual bool available() = 0;
30
31 protected:
32 void reverse(void* buf, size_t len);
33
34 public:
35 virtual bool readBool();
36 virtual char readChar();
37 virtual short readShort();
38 virtual int readInt();
39 virtual long long readLong();
40 virtual unsigned char readUChar();
41 virtual unsigned short readUShort();
42 virtual unsigned int readUInt();
43 virtual unsigned long long readULong();
44 virtual float readFloat();
45 virtual double readDouble();
46 virtual const std::string readString();
47 virtual void readObject(Serializable&);
48
49 };
50
52};
53
54#endif
Abstract base class for different kinds of events.