25#ifndef INCLUDED_HWPFILTER_SOURCE_HIODEV_H
26#define INCLUDED_HWPFILTER_SOURCE_HIODEV_H
54 virtual bool read1b(
unsigned char &out) = 0;
56 virtual bool read2b(
unsigned short &out) = 0;
57 virtual bool read4b(
unsigned int &out) = 0;
59 virtual size_t readBlock(
void *ptr,
size_t size ) = 0;
62 size_t read2b(
void *ptr,
size_t nmemb );
63 size_t read4b(
void *ptr,
size_t nmemb );
86 virtual bool open()
override;
90 virtual void flush()
override;
94 virtual bool state()
const override;
102 virtual bool read1b(
unsigned char &out)
override;
103 virtual bool read1b(
char &out)
override;
108 virtual bool read2b(
unsigned short &out)
override;
113 virtual bool read4b(
unsigned int &out)
override;
114 virtual bool read4b(
int &out)
override;
118 virtual size_t readBlock(
void *ptr,
size_t size )
override;
122 virtual size_t skipBlock(
size_t size )
override;
127 virtual void init()
override;
143 virtual bool open()
override;
144 virtual void flush()
override;
145 virtual bool state()
const override;
148 virtual bool read1b(
unsigned char &out)
override;
149 virtual bool read1b(
char &out)
override;
151 virtual bool read2b(
unsigned short &out)
override;
153 virtual bool read4b(
unsigned int &out)
override;
154 virtual bool read4b(
int &out)
override;
155 virtual size_t readBlock(
void *
ptr,
size_t size )
override;
156 virtual size_t skipBlock(
size_t size )
override;
158 virtual void init()
override;
FILE * init(int, char **)
hwpio.h (C) 1999 Mizi Research, All rights are reserved
virtual bool read2b(unsigned short &out)=0
virtual bool read1b(char &out)=0
virtual bool read4b(int &out)=0
virtual bool state() const =0
virtual bool read1b(unsigned char &out)=0
virtual size_t skipBlock(size_t size)=0
virtual bool setCompressed(bool)=0
virtual bool read4b(unsigned int &out)=0
virtual size_t readBlock(void *ptr, size_t size)=0
The HMemIODev class controls the Input/Output device.
virtual size_t skipBlock(size_t size) override
virtual size_t readBlock(void *ptr, size_t size) override
virtual bool read1b(unsigned char &out) override
virtual ~HMemIODev() override
virtual void init() override
virtual bool read4b(unsigned int &out) override
virtual bool state() const override
HMemIODev(char *s, size_t len)
virtual bool read2b(unsigned short &out) override
virtual void flush() override
virtual bool setCompressed(bool) override
virtual bool open() override
This controls the HStream given by constructor.
virtual size_t readBlock(void *ptr, size_t size) override
Read some bytes from stream to given pointer as amount of size.
virtual void flush() override
If the stream is gzipped, flush the stream.
virtual bool read1b(unsigned char &out) override
Read one byte from stream.
virtual ~HStreamIODev() override
virtual size_t skipBlock(size_t size) override
Move current pointer of stream as amount of size.
virtual bool read2b(unsigned short &out) override
std::unique_ptr< HStream > _stream
HStreamIODev(std::unique_ptr< HStream > stream)
virtual bool setCompressed(bool) override
Set whether the stream is compressed or not.
virtual bool read4b(unsigned int &out) override
virtual bool open() override
Check whether the stream is available.
virtual void init() override
Initialize this object.
virtual bool state() const override
Not implemented.
Structure for using z_stream.