ManaPlus
Public Member Functions | Data Fields
VirtFs::File Struct Reference

#include <file.h>

Public Member Functions

 File (const FsFuncs *const funcs0, const uint8_t *const buf, const size_t sz)
 
 File (const FsFuncs *const funcs0, FILE *const fd)
 
 ~File ()
 

Data Fields

const FsFuncsfuncs
 
const uint8_t * mBuf
 
size_t mPos
 
size_t mSize
 
FILE *const mFd
 

Detailed Description

Definition at line 34 of file file.h.

Constructor & Destructor Documentation

◆ File() [1/2]

VirtFs::File::File ( const FsFuncs *const  funcs0,
const uint8_t *const  buf,
const size_t  sz 
)

Definition at line 29 of file file.cpp.

31  :
32  funcs(funcs0),
33  mBuf(buf),
34  mPos(0U),
35  mSize(sz),
37 {
38 }
#define FILEHDEFAULT
Definition: fileapi.h:30
size_t mPos
Definition: file.h:53
size_t mSize
Definition: file.h:54
FILE *const mFd
Definition: file.h:57
const uint8_t * mBuf
Definition: file.h:50
const FsFuncs * funcs
Definition: file.h:47

◆ File() [2/2]

VirtFs::File::File ( const FsFuncs *const  funcs0,
FILE *const  fd 
)

Definition at line 40 of file file.cpp.

41  :
42  funcs(funcs0),
43  mBuf(nullptr),
44  mPos(0U),
45  mSize(0U),
46  mFd(fd)
47 {
48 }

◆ ~File()

VirtFs::File::~File ( )

Definition at line 50 of file file.cpp.

51 {
52  if (mFd != FILEHDEFAULT)
53  FILECLOSE(mFd);
54  delete [] mBuf;
55 }
#define FILECLOSE
Definition: fileapi.h:32

References FILECLOSE, FILEHDEFAULT, mBuf, and mFd.

Field Documentation

◆ funcs

const FsFuncs* VirtFs::File::funcs

Definition at line 47 of file file.h.

Referenced by VirtFs::create_rwops(), and VirtFs::FsZip::rwops_read().

◆ mBuf

const uint8_t* VirtFs::File::mBuf

Definition at line 50 of file file.h.

Referenced by ~File().

◆ mFd

FILE* const VirtFs::File::mFd

◆ mPos

size_t VirtFs::File::mPos

Definition at line 53 of file file.h.

Referenced by VirtFs::FsZip::rwops_seek().

◆ mSize

size_t VirtFs::File::mSize

Definition at line 54 of file file.h.

Referenced by VirtFs::FsZip::rwops_seek().


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