File: IInOutStreams.h

package info (click to toggle)
apngasm 2.91-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,760 kB
  • sloc: ansic: 34,259; cpp: 7,258; makefile: 40
file content (31 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef __IINOUTSTREAMS_H
#define __IINOUTSTREAMS_H

#include "Portable.h"

class ISequentialInStream
{
	const char* data;
	INT size;
public:
	ISequentialInStream(const char* Adata, INT Asize) : data(Adata), size(Asize) { }

	HRESULT Read(void *aData, INT aSize, INT *aProcessedSize);
};

class ISequentialOutStream
{
	char* data;
	INT size;
	bool overflow;
	INT total;
public:
	ISequentialOutStream(char* Adata, unsigned Asize) : data(Adata), size(Asize), overflow(false), total(0) { }

	bool overflow_get() const { return overflow; }
	INT size_get() const { return total; }

	HRESULT Write(const void *aData, INT aSize, INT *aProcessedSize);
};

#endif