OpenClonk
C4GroupEntry Class Reference

#include <C4Group.h>

Inheritance diagram for C4GroupEntry:
[legend]
Collaboration diagram for C4GroupEntry:
[legend]

Public Types

enum  EntryStatus { C4GRES_InGroup, C4GRES_OnDisk, C4GRES_InMemory, C4GRES_Deleted }
 

Public Member Functions

 ~C4GroupEntry ()
 
void Set (const DirectoryIterator &iter, const char *szPath)
 

Public Attributes

char DiskPath [_MAX_PATH+1] = { 0 }
 
EntryStatus Status = C4GRES_InGroup
 
bool DeleteOnDisk = false
 
bool HoldBuffer = false
 
bool BufferIsStdbuf = false
 
bool NoSort = false
 
BYTEbpMemBuf = nullptr
 
C4GroupEntryNext = nullptr
 
char FileName [260] = { 0 }
 
int32_t Packed = 0
 
int32_t ChildGroup = 0
 
int32_t Size = 0
 
int32_t reserved1 = 0
 
int32_t Offset = 0
 
int32_t reserved2 = 0
 
char reserved3 = '\0'
 
unsigned int reserved4 = 0
 
char Executable = '\0'
 
BYTE fbuf [26] = { 0 }
 

Detailed Description

Definition at line 105 of file C4Group.h.

Member Enumeration Documentation

◆ EntryStatus

Enumerator
C4GRES_InGroup 
C4GRES_OnDisk 
C4GRES_InMemory 
C4GRES_Deleted 

Definition at line 110 of file C4Group.h.

Constructor & Destructor Documentation

◆ ~C4GroupEntry()

C4GroupEntry::~C4GroupEntry ( )

Definition at line 450 of file C4Group.cpp.

References StdBuf::DeletePointer().

451 {
452  if (HoldBuffer)
453  if (bpMemBuf)
454  {
455  if (BufferIsStdbuf)
457  else
458  delete [] bpMemBuf;
459  }
460 }
bool BufferIsStdbuf
Definition: C4Group.h:123
bool HoldBuffer
Definition: C4Group.h:122
static void DeletePointer(void *data)
Definition: StdBuf.h:196
BYTE * bpMemBuf
Definition: C4Group.h:125
Here is the call graph for this function:

Member Function Documentation

◆ Set()

void C4GroupEntry::Set ( const DirectoryIterator iter,
const char *  szPath 
)

Definition at line 462 of file C4Group.cpp.

References _MAX_FNAME, _MAX_PATH, C4Group::P::FileName, GetFilename(), DirectoryIterator::GetFileSize(), InplaceReconstruct(), and SCopy().

463 {
464  InplaceReconstruct(this);
465 
467  SCopy(*iter, DiskPath, _MAX_PATH-1);
468  Size = iter.GetFileSize();
470  Packed=false;
471  ChildGroup=false;
472  // Notice folder entries are not checked for ChildGroup status.
473  // This would cause extreme performance loss and be good for
474  // use in entry list display only.
475 }
char * GetFilename(char *szPath)
Definition: StdFile.cpp:45
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
Definition: Standard.cpp:152
char FileName[260]
Definition: C4Group.h:93
#define _MAX_PATH
int32_t Packed
Definition: C4Group.h:94
int32_t ChildGroup
Definition: C4Group.h:94
#define _MAX_FNAME
int32_t Size
Definition: C4Group.h:95
size_t GetFileSize() const
Definition: StdFile.cpp:1035
std::enable_if< std::is_nothrow_default_constructible< T >::value >::type InplaceReconstruct(T *obj)
Definition: Standard.h:35
Definition: C4Group.h:113
EntryStatus Status
Definition: C4Group.h:120
char DiskPath[_MAX_PATH+1]
Definition: C4Group.h:119
Here is the call graph for this function:

Member Data Documentation

◆ bpMemBuf

BYTE* C4GroupEntry::bpMemBuf = nullptr

◆ BufferIsStdbuf

bool C4GroupEntry::BufferIsStdbuf = false

Definition at line 123 of file C4Group.h.

Referenced by C4Group::GetFirstEntry(), and C4Group::Open().

◆ ChildGroup

int32_t C4GroupEntryCore::ChildGroup = 0
inherited

◆ DeleteOnDisk

bool C4GroupEntry::DeleteOnDisk = false

Definition at line 121 of file C4Group.h.

Referenced by C4Group::Clear(), C4Group::DeleteEntry(), and C4Group::Open().

◆ DiskPath

char C4GroupEntry::DiskPath[_MAX_PATH+1] = { 0 }

◆ Executable

char C4GroupEntryCore::Executable = '\0'
inherited

◆ fbuf

BYTE C4GroupEntryCore::fbuf[26] = { 0 }
inherited

Definition at line 100 of file C4Group.h.

◆ FileName

◆ HoldBuffer

bool C4GroupEntry::HoldBuffer = false

Definition at line 122 of file C4Group.h.

Referenced by C4Group::GetFirstEntry(), and C4Group::Open().

◆ Next

◆ NoSort

bool C4GroupEntry::NoSort = false

Definition at line 124 of file C4Group.h.

Referenced by C4Group::Clear(), C4Group::Open(), and C4GroupEx::SetNoSort().

◆ Offset

int32_t C4GroupEntryCore::Offset = 0
inherited

◆ Packed

int32_t C4GroupEntryCore::Packed = 0
inherited

Definition at line 94 of file C4Group.h.

◆ reserved1

int32_t C4GroupEntryCore::reserved1 = 0
inherited

Definition at line 95 of file C4Group.h.

◆ reserved2

int32_t C4GroupEntryCore::reserved2 = 0
inherited

Definition at line 96 of file C4Group.h.

◆ reserved3

char C4GroupEntryCore::reserved3 = '\0'
inherited

Definition at line 97 of file C4Group.h.

◆ reserved4

unsigned int C4GroupEntryCore::reserved4 = 0
inherited

Definition at line 98 of file C4Group.h.

◆ Size

◆ Status


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