Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4680 right-hear 1
 
2
#define __compressedfiles_h__
3
4
 
5
#include "lispassert.h"
6
7
 
8
{
9
public:
10
  CompressedFiles(unsigned char * aBuffer, LispInt aFullSize, LispInt aCompressed);
11
  ~CompressedFiles();
12
  LispInt FindFile(LispChar * aName);
13
  LispChar * Name(LispInt aIndex);
14
  LispChar * Contents(LispInt aIndex);
15
  inline LispInt NrFiles() const {return iNrFiles;}
16
  void Sizes(LispInt& aOriginalSize, LispInt& aCompressedSize, LispInt aIndex);
17
  inline LispInt IsValid() const {return iIsValid;}
18
protected:
19
  LispInt GetInt(unsigned char*&indptr);
20
21
 
22
  // copy constructor not implemented yet, so an assert is in order
23
  CompressedFiles(const CompressedFiles& aOther)
24
    : iFullBuffer(NULL),iCompressed(0),iFullSize(0),iIndex(NULL),iNrFiles(0),iIndexSize(0),iIsValid(LispFalse)
25
  {
26
    LISPASSERT(0);
27
  }
28
  inline CompressedFiles& operator=(const CompressedFiles& aOther)
29
  {
30
    iFullBuffer = NULL;
31
    iCompressed = 0;
32
    iFullSize = 0;
33
    iIndex = NULL;
34
    iNrFiles = 0;
35
    iIndexSize = 0;
36
    iIsValid = LispFalse;
37
    LISPASSERT(0);
38
    return *this;
39
  }
40
private:
41
  unsigned char * iFullBuffer;
42
  LispInt iCompressed;
43
  LispInt iFullSize;
44
  unsigned char * *iIndex;
45
  LispInt iNrFiles;
46
  LispInt iIndexSize;
47
  LispInt iIsValid;
48
};
49
50
 
51