The Pedigree Project 0.1
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Archive Class Reference

#include <Archive.h>

+ Collaboration diagram for Archive:

Classes

struct  ArchiveFile
 

Public Member Functions

 Archive (uint8_t *pPhys, size_t sSize)
 
 ~Archive ()
 
size_t getNumFiles ()
 
size_t getFileSize (size_t n)
 
char * getFileName (size_t n)
 
uintptr_t * getFile (size_t n)
 

Private Member Functions

ArchiveFile * getFirst ()
 
ArchiveFile * getNext (ArchiveFile *pFile)
 
ArchiveFile * get (size_t n)
 

Private Attributes

uint8_t * m_pBase
 
MemoryRegion m_Region
 

Detailed Description

This class provides functions for extracting an archive file as made by UNIX Tar.

Definition at line 30 of file Archive.h.

Constructor & Destructor Documentation

◆ Archive()

Archive::Archive ( uint8_t *  pPhys,
size_t  sSize 
)

◆ ~Archive()

Archive::~Archive ( )

Destructor; returns the physical memory used during construction to the physical memory pool.

Definition at line 47 of file Archive.cc.

Member Function Documentation

◆ get()

Archive::ArchiveFile * Archive::get ( size_t  n)
private

Definition at line 94 of file Archive.cc.

◆ getFile()

uintptr_t * Archive::getFile ( size_t  n)

Returns a pointer to the first byte of the n'th file.

Parameters
nThe file to retrieve.

Definition at line 71 of file Archive.cc.

◆ getFileName()

char * Archive::getFileName ( size_t  n)

Returns the name of the n'th file in the archive, in bytes.

Parameters
nThe file to retrieve.

Definition at line 67 of file Archive.cc.

◆ getFileSize()

size_t Archive::getFileSize ( size_t  n)

Returns the size of the n'th file in the archive, in bytes.

Parameters
nThe file to retrieve.

Definition at line 61 of file Archive.cc.

◆ getFirst()

Archive::ArchiveFile * Archive::getFirst ( )
private

Definition at line 75 of file Archive.cc.

◆ getNext()

Archive::ArchiveFile * Archive::getNext ( ArchiveFile *  pFile)
private

Definition at line 84 of file Archive.cc.

◆ getNumFiles()

size_t Archive::getNumFiles ( )

Returns the number of files in the archive.

Definition at line 51 of file Archive.cc.

Member Data Documentation

◆ m_pBase

uint8_t* Archive::m_pBase
private

Definition at line 70 of file Archive.h.

◆ m_Region

MemoryRegion Archive::m_Region
private

Definition at line 71 of file Archive.h.


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