TrinityCore
CASCFile Class Reference

#include <cascfile.h>

Public Member Functions

 CASCFile (std::shared_ptr< CASC::Storage const > casc, const char *filename, bool warnNoExist=true)
 
 CASCFile (std::shared_ptr< CASC::Storage const > casc, uint32 fileDataId, std::string const &description, bool warnNoExist=true)
 
 ~CASCFile ()
 
void init (CASC::File *file, const char *description)
 
size_t read (void *dest, size_t bytes)
 
size_t getSize ()
 
size_t getPos ()
 
char * getBuffer ()
 
char * getPointer ()
 
bool isEof ()
 
void seek (int offset)
 
void seekRelative (int offset)
 
void close ()
 

Private Member Functions

 CASCFile (const CASCFile &f)=delete
 
CASCFileoperator= (const CASCFile &f)=delete
 

Private Attributes

bool eof
 
char * buffer
 
size_t pointer
 
size_t size
 

Detailed Description

Definition at line 32 of file cascfile.h.

Constructor & Destructor Documentation

◆ CASCFile() [1/3]

CASCFile::CASCFile ( const CASCFile f)
privatedelete

◆ CASCFile() [2/3]

CASCFile::CASCFile ( std::shared_ptr< CASC::Storage const >  casc,
const char *  filename,
bool  warnNoExist = true 
)

Definition at line 22 of file cascfile.cpp.

+ Here is the call graph for this function:

◆ CASCFile() [3/3]

CASCFile::CASCFile ( std::shared_ptr< CASC::Storage const >  casc,
uint32  fileDataId,
std::string const &  description,
bool  warnNoExist = true 
)

Definition at line 40 of file cascfile.cpp.

+ Here is the call graph for this function:

◆ ~CASCFile()

CASCFile::~CASCFile ( )
inline

Definition at line 45 of file cascfile.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ close()

void CASCFile::close ( )

Definition at line 111 of file cascfile.cpp.

+ Here is the caller graph for this function:

◆ getBuffer()

char * CASCFile::getBuffer ( )
inline

Definition at line 50 of file cascfile.h.

+ Here is the caller graph for this function:

◆ getPointer()

char * CASCFile::getPointer ( )
inline

Definition at line 51 of file cascfile.h.

+ Here is the caller graph for this function:

◆ getPos()

size_t CASCFile::getPos ( )
inline

Definition at line 49 of file cascfile.h.

+ Here is the caller graph for this function:

◆ getSize()

size_t CASCFile::getSize ( )
inline

Definition at line 48 of file cascfile.h.

+ Here is the caller graph for this function:

◆ init()

void CASCFile::init ( CASC::File file,
const char *  description 
)

Definition at line 58 of file cascfile.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEof()

bool CASCFile::isEof ( )
inline

Definition at line 52 of file cascfile.h.

+ Here is the caller graph for this function:

◆ operator=()

CASCFile & CASCFile::operator= ( const CASCFile f)
privatedelete

◆ read()

size_t CASCFile::read ( void *  dest,
size_t  bytes 
)

Definition at line 80 of file cascfile.cpp.

+ Here is the caller graph for this function:

◆ seek()

void CASCFile::seek ( int  offset)

Definition at line 99 of file cascfile.cpp.

+ Here is the caller graph for this function:

◆ seekRelative()

void CASCFile::seekRelative ( int  offset)

Definition at line 105 of file cascfile.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ buffer

char* CASCFile::buffer
private

Definition at line 35 of file cascfile.h.

◆ eof

bool CASCFile::eof
private

Definition at line 34 of file cascfile.h.

◆ pointer

size_t CASCFile::pointer
private

Definition at line 36 of file cascfile.h.

◆ size

size_t CASCFile::size
private

Definition at line 36 of file cascfile.h.


The documentation for this class was generated from the following files: