20 #ifndef OPENXCOM_CATFILE_H
21 #define OPENXCOM_CATFILE_H
34 unsigned int _amount, *_offset, *_size;
43 return std::ifstream::operator!();
53 return (i < _amount) ? _size[i] : 0;
56 char *
load(
unsigned int i,
bool name =
false);
unsigned int getObjectSize(unsigned int i) const
Get object size.
Definition: CatFile.h:51
int getAmount() const
Get amount of objects.
Definition: CatFile.h:46
CatFile(const char *path)
Creates a CAT file stream.
Definition: CatFile.cpp:32
bool operator!() const
Inherit operator.
Definition: CatFile.h:41
char * load(unsigned int i, bool name=false)
Load an object into memory.
Definition: CatFile.cpp:76
Subclass of std::ifstream to handle CAT files.
Definition: CatFile.h:31
~CatFile()
Cleans up the stream.
Definition: CatFile.cpp:62