OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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

Enumerator
C4GRES_InGroup 
C4GRES_OnDisk 
C4GRES_InMemory 
C4GRES_Deleted 

Definition at line 110 of file C4Group.h.

Constructor & Destructor Documentation

C4GroupEntry::~C4GroupEntry ( )

Definition at line 450 of file C4Group.cpp.

References bpMemBuf, BufferIsStdbuf, StdBuf::DeletePointer(), and HoldBuffer.

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

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

Definition at line 462 of file C4Group.cpp.

References _MAX_FNAME, _MAX_PATH, C4GRES_OnDisk, C4GroupEntryCore::ChildGroup, DiskPath, C4GroupEntryCore::FileName, GetFilename(), DirectoryIterator::GetFileSize(), InplaceReconstruct(), C4GroupEntryCore::Packed, SCopy(), C4GroupEntryCore::Size, and Status.

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
size_t GetFileSize() const
Definition: StdFile.cpp:1034
int32_t ChildGroup
Definition: C4Group.h:94
#define _MAX_FNAME
int32_t Size
Definition: C4Group.h:95
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

BYTE* C4GroupEntry::bpMemBuf = nullptr

Definition at line 125 of file C4Group.h.

Referenced by ~C4GroupEntry().

bool C4GroupEntry::BufferIsStdbuf = false

Definition at line 123 of file C4Group.h.

Referenced by ~C4GroupEntry().

int32_t C4GroupEntryCore::ChildGroup = 0
inherited

Definition at line 94 of file C4Group.h.

Referenced by C4Group::Delete(), C4Group::ExtractEntry(), C4Group::OpenAsChild(), and Set().

bool C4GroupEntry::DeleteOnDisk = false

Definition at line 121 of file C4Group.h.

Referenced by C4Group::DeleteEntry().

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

Definition at line 119 of file C4Group.h.

Referenced by C4Group::DeleteEntry(), and Set().

char C4GroupEntryCore::Executable = '\0'
inherited
BYTE C4GroupEntryCore::fbuf[26] = { 0 }
inherited

Definition at line 100 of file C4Group.h.

char C4GroupEntryCore::FileName[260] = { 0 }
inherited
bool C4GroupEntry::HoldBuffer = false

Definition at line 122 of file C4Group.h.

Referenced by ~C4GroupEntry().

C4GroupEntry* C4GroupEntry::Next = nullptr
bool C4GroupEntry::NoSort = false

Definition at line 124 of file C4Group.h.

Referenced by C4GroupEx::SetNoSort().

int32_t C4GroupEntryCore::Offset = 0
inherited

Definition at line 95 of file C4Group.h.

Referenced by C4Group::OpenAsChild(), and C4Group::Save().

int32_t C4GroupEntryCore::Packed = 0
inherited

Definition at line 94 of file C4Group.h.

Referenced by Set().

int32_t C4GroupEntryCore::reserved1 = 0
inherited

Definition at line 95 of file C4Group.h.

int32_t C4GroupEntryCore::reserved2 = 0
inherited

Definition at line 96 of file C4Group.h.

char C4GroupEntryCore::reserved3 = '\0'
inherited

Definition at line 97 of file C4Group.h.

unsigned int C4GroupEntryCore::reserved4 = 0
inherited

Definition at line 98 of file C4Group.h.

int32_t C4GroupEntryCore::Size = 0
inherited
EntryStatus C4GroupEntry::Status = C4GRES_InGroup

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