Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
TagBlockFile Class Reference

#include <TagBlock.h>

Inherits RawFileClass.

Classes

struct  BlockHeader
 
struct  FileHeader
 

Public Member Functions

 TagBlockFile (const char *fname)
 
virtual ~TagBlockFile ()
 
virtual void Reset_File ()
 
TagBlockHandleOpen_Tag (const char *tagname)
 
TagBlockHandleCreate_Tag (const char *tagname)
 
void Close_Tag (TagBlockHandle *handle)
 
int Does_Tag_Exist (const char *tagname)
 
virtual unsigned long Get_Date_Time (void)
 

Static Public Member Functions

static int Calc_Tag_Offset (int blockoffset)
 
static int Calc_Data_Offset (int blockoffset, const char *tagname)
 

Protected Types

enum  { FILE_VERSION = 20000626 , MAX_TAG_NAME_SIZE = 1024 }
 
- Protected Types inherited from FileClass
enum  { READ = 1 , WRITE = 2 , PRINTF_BUFFER_SIZE = 1024 }
 
enum  { READ = 1 , WRITE = 2 , PRINTF_BUFFER_SIZE = 1024 }
 

Protected Member Functions

TagBlockIndexFind_Block (const char *tagname)
 
TagBlockIndexCreate_Index (const char *tagname, int blockoffset)
 
int Handle_Can_Write (TagBlockHandle *handle)
 
void Destroy_Handle (TagBlockHandle *handle)
 
int End_Write_Access (TagBlockHandle *handle)
 
void Save_Header ()
 
void Empty_Index_List ()
 
- Protected Member Functions inherited from RawFileClass
int Transfer_Block_Size (void)
 
int Raw_Seek (int pos, int dir=SEEK_CUR)
 
void Reset (void)
 
int Transfer_Block_Size (void)
 
int Raw_Seek (int pos, int dir=SEEK_CUR)
 
void Reset (void)
 
 RawFileClass (char const *filename)
 
 RawFileClass (void)
 
 RawFileClass (RawFileClass const &f)
 
RawFileClassoperator= (RawFileClass const &f)
 
virtual ~RawFileClass (void)
 
virtual char const * File_Name (void) const
 
virtual char const * Set_Name (char const *filename)
 
virtual int Create (void)
 
virtual int Delete (void)
 
virtual bool Is_Available (int forced=false)
 
virtual bool Is_Open (void) const
 
virtual int Open (char const *filename, int rights=READ)
 
virtual int Open (int rights=READ)
 
virtual int Read (void *buffer, int size)
 
virtual int Seek (int pos, int dir=SEEK_CUR)
 
virtual int Size (void)
 
virtual int Write (void const *buffer, int size)
 
virtual void Close (void)
 
virtual bool Set_Date_Time (unsigned long datetime)
 
virtual void Error (int error, int canretry=false, char const *filename=NULL)
 
virtual void Bias (int start, int length=-1)
 
virtual void * Get_File_Handle (void)
 
virtual void Attach (void *handle, int rights=READ)
 
virtual void Detach (void)
 
 RawFileClass (char const *filename)
 
 RawFileClass (void)
 
 RawFileClass (RawFileClass const &f)
 
RawFileClassoperator= (RawFileClass const &f)
 
virtual ~RawFileClass (void)
 
virtual char const * File_Name (void) const
 
virtual char const * Set_Name (char const *filename)
 
virtual int Create (void)
 
virtual int Delete (void)
 
virtual bool Is_Available (int forced=false)
 
virtual bool Is_Open (void) const
 
virtual int Open (char const *filename, int rights=READ)
 
virtual int Open (int rights=READ)
 
virtual int Read (void *buffer, int size)
 
virtual int Seek (int pos, int dir=SEEK_CUR)
 
virtual int Size (void)
 
virtual int Write (void const *buffer, int size)
 
virtual void Close (void)
 
virtual bool Set_Date_Time (unsigned long datetime)
 
virtual void Error (int error, int canretry=false, char const *filename=NULL)
 
void Bias (int start, int length=-1)
 
virtual void * Get_File_Handle (void)
 
virtual void Attach (void *handle, int rights=READ)
 
virtual void Detach (void)
 
- Protected Member Functions inherited from FileClass
virtual ~FileClass (void)
 
virtual int Tell (void)
 
 operator char const * ()
 
int Printf (char *str,...)
 
int Printf (char *buffer, int bufferSize, char *str,...)
 
int Printf_Indented (unsigned depth, char *str,...)
 
virtual ~FileClass (void)
 
virtual int Tell (void)
 
 operator char const * ()
 
int Printf (char *str,...)
 
int Printf (char *buffer, int bufferSize, char *str,...)
 
int Printf_Indented (unsigned depth, char *str,...)
 

Protected Attributes

FileHeader Header
 
TagBlockHandleCreateHandle
 
int NumOpenHandles
 
unsigned long FileTime
 
SList< TagBlockIndexIndexList
 
- Protected Attributes inherited from RawFileClass
int Rights
 
int BiasStart
 
int BiasLength
 

Friends

class TagBlockHandle
 

Detailed Description

Definition at line 68 of file TagBlock.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
FILE_VERSION 
MAX_TAG_NAME_SIZE 

Definition at line 111 of file TagBlock.h.

Constructor & Destructor Documentation

◆ TagBlockFile()

TagBlockFile::TagBlockFile ( const char * fname)

Definition at line 123 of file tagblock.cpp.

◆ ~TagBlockFile()

TagBlockFile::~TagBlockFile ( )
virtual

Definition at line 199 of file tagblock.cpp.

Member Function Documentation

◆ Calc_Data_Offset()

static int TagBlockFile::Calc_Data_Offset ( int blockoffset,
const char * tagname )
inlinestatic

Definition at line 103 of file TagBlock.h.

◆ Calc_Tag_Offset()

static int TagBlockFile::Calc_Tag_Offset ( int blockoffset)
inlinestatic

Definition at line 100 of file TagBlock.h.

◆ Close_Tag()

void TagBlockFile::Close_Tag ( TagBlockHandle * handle)

Definition at line 327 of file tagblock.cpp.

◆ Create_Index()

TagBlockIndex * TagBlockFile::Create_Index ( const char * tagname,
int blockoffset )
protected

Definition at line 406 of file tagblock.cpp.

◆ Create_Tag()

TagBlockHandle * TagBlockFile::Create_Tag ( const char * tagname)

Definition at line 282 of file tagblock.cpp.

◆ Destroy_Handle()

void TagBlockFile::Destroy_Handle ( TagBlockHandle * handle)
protected

Definition at line 344 of file tagblock.cpp.

◆ Does_Tag_Exist()

int TagBlockFile::Does_Tag_Exist ( const char * tagname)
inline

Definition at line 90 of file TagBlock.h.

◆ Empty_Index_List()

void TagBlockFile::Empty_Index_List ( )
protected

Definition at line 504 of file tagblock.cpp.

◆ End_Write_Access()

int TagBlockFile::End_Write_Access ( TagBlockHandle * handle)
protected

Definition at line 371 of file tagblock.cpp.

◆ Find_Block()

TagBlockIndex * TagBlockFile::Find_Block ( const char * tagname)
protected

Definition at line 450 of file tagblock.cpp.

◆ Get_Date_Time()

virtual unsigned long TagBlockFile::Get_Date_Time ( void )
inlinevirtual

Reimplemented from RawFileClass.

Definition at line 94 of file TagBlock.h.

◆ Handle_Can_Write()

int TagBlockFile::Handle_Can_Write ( TagBlockHandle * handle)
inlineprotected

Definition at line 191 of file TagBlock.h.

◆ Open_Tag()

TagBlockHandle * TagBlockFile::Open_Tag ( const char * tagname)

Definition at line 247 of file tagblock.cpp.

◆ Reset_File()

void TagBlockFile::Reset_File ( )
virtual

Definition at line 216 of file tagblock.cpp.

◆ Save_Header()

void TagBlockFile::Save_Header ( )
inlineprotected

Definition at line 202 of file TagBlock.h.

Friends And Related Symbol Documentation

◆ TagBlockHandle

friend class TagBlockHandle
friend

Definition at line 209 of file TagBlock.h.

Member Data Documentation

◆ CreateHandle

TagBlockHandle* TagBlockFile::CreateHandle
protected

Definition at line 167 of file TagBlock.h.

◆ FileTime

unsigned long TagBlockFile::FileTime
protected

Definition at line 174 of file TagBlock.h.

◆ Header

FileHeader TagBlockFile::Header
protected

Definition at line 163 of file TagBlock.h.

◆ IndexList

SList<TagBlockIndex> TagBlockFile::IndexList
protected

Definition at line 178 of file TagBlock.h.

◆ NumOpenHandles

int TagBlockFile::NumOpenHandles
protected

Definition at line 171 of file TagBlock.h.


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