WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Buffer.h
1#ifndef _WINC_BUFFER
2#define _WINC_BUFFER
3
4namespace WXP {
5 class Buffer {
6 int size;
7 int max;
8 int ind;
9 unsigned char *data;
11 public:
12 int initClass();
13 int init( int rsize );
14 Buffer();
15 Buffer(int rsize);
16 ~Buffer();
17 Buffer( const Buffer &data );
18 Buffer operator=( const Buffer &data );
19 int copy( const Buffer &data );
20 int clear();
21 int resize( int rsize );
22 int check( int rsize );
23 int add( unsigned char *dat, int rsize );
24 int insert( int loc, unsigned char *dat, int rsize );
25 int insert( int loc, const Buffer &data );
27 inline const unsigned char *get(){ return data+ind; };
28 unsigned char get( int ind );
29 int read( unsigned char *dat, int rsize );
30 int read( Buffer &buf );
31 int read( Buffer &buf, int rsize );
32 int readLine( unsigned char *dat, int rsize );
33 int skipLine();
34 int clearUsed();
35 int seek( int num );
36 int inc( int num );
37 int trunc( int num );
38 int equal( int off, const char *str );
40 inline int getInd() { return ind; };
42 inline int getSize() { return size; };
44 inline int getAvail() { return size-ind; };
46 inline int getMax() { return max; };
47 int print();
48 int dump( int off, int num );
50 inline int dump( int num ){ return dump( 0, num ); };
52 inline int dump(){ return dump( 0, size ); };
53
54 friend class File;
55 friend class Zlib;
56 friend class BZlib;
57 };
58}
59#endif
This class manages bzip2 decompression.
Definition BZlib.h:9
This class creates a generic buffer for data.
Definition Buffer.h:5
int inc(int num)
Definition Buffer.cc:298
int dump()
Definition Buffer.h:52
int trunc(int num)
Definition Buffer.cc:317
int getAvail()
Definition Buffer.h:44
const unsigned char * get()
Definition Buffer.h:27
int read(unsigned char *dat, int rsize)
Definition Buffer.cc:194
int add(unsigned char *dat, int rsize)
Definition Buffer.cc:136
int skipLine()
Definition Buffer.cc:260
int readLine(unsigned char *dat, int rsize)
Definition Buffer.cc:239
int dump(int num)
Definition Buffer.h:50
int getMax()
Definition Buffer.h:46
int insert(int loc, unsigned char *dat, int rsize)
Definition Buffer.cc:149
~Buffer()
Definition Buffer.cc:61
int resize(int rsize)
Definition Buffer.cc:103
int check(int rsize)
Definition Buffer.cc:125
int getInd()
Definition Buffer.h:40
int initClass()
Definition Buffer.cc:19
int copy(const Buffer &data)
Definition Buffer.cc:90
int getSize()
Definition Buffer.h:42
int init(int rsize)
Definition Buffer.cc:31
int print()
Definition Buffer.cc:343
int equal(int off, const char *str)
Definition Buffer.cc:333
Buffer operator=(const Buffer &data)
Definition Buffer.cc:78
int clearUsed()
Definition Buffer.cc:276
Buffer()
Definition Buffer.cc:45
int seek(int num)
Definition Buffer.cc:287
int clear()
Definition Buffer.cc:307
This class accesses files.
Definition File.h:15
This class manages zlib decompression.
Definition Zlib.h:9
All WXP classes fall under the WXP namespace.
Definition Angle.h:4