NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
YCompoundFiles::Block Class Reference

#include <BasicExcel.hpp>

Collaboration diagram for YCompoundFiles::Block:

Public Member Functions

 Block ()
 
bool Create (const wchar_t *filename)
 
bool Open (const wchar_t *filename, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)
 
bool Close ()
 
bool IsOpen ()
 
bool Read (size_t index, char *block)
 
bool Write (size_t index, const char *block)
 
bool Swap (size_t index1, size_t index2)
 
bool Move (size_t from, size_t to)
 
bool Insert (size_t index, const char *block)
 
bool Erase (size_t index)
 
bool Erase (std::vector< size_t > &indices)
 
size_t GetBlockSize () const
 
void SetBlockSize (size_t size)
 

Protected Attributes

std::vector< char > filename_
 
std::ios_base::openmode mode_
 
std::fstream file_
 
size_t blockSize_
 
size_t indexEnd_
 
size_t fileSize_
 

Detailed Description

Definition at line 69 of file BasicExcel.hpp.

Constructor & Destructor Documentation

◆ Block()

YCompoundFiles::Block::Block ( )

Definition at line 9 of file BasicExcel.cpp.

Member Function Documentation

◆ Close()

bool YCompoundFiles::Block::Close ( )

Definition at line 69 of file BasicExcel.cpp.

References blockSize_, file_, filename_, fileSize_, and indexEnd_.

Referenced by YCompoundFiles::CompoundFile::Close(), and Open().

◆ Create()

bool YCompoundFiles::Block::Create ( const wchar_t *  filename)

Definition at line 12 of file BasicExcel.cpp.

References file_, name, Open(), date::detail::trunc(), and wcstombs().

Referenced by YCompoundFiles::CompoundFile::Create().

Here is the call graph for this function:

◆ Erase() [1/2]

bool YCompoundFiles::Block::Erase ( size_t  index)

Definition at line 198 of file BasicExcel.cpp.

References blockSize_, file_, filename_, fileSize_, indexEnd_, mode_, and date::detail::trunc().

Referenced by YCompoundFiles::CompoundFile::FreeBlocks().

Here is the call graph for this function:

◆ Erase() [2/2]

bool YCompoundFiles::Block::Erase ( std::vector< size_t > &  indices)

Definition at line 231 of file BasicExcel.cpp.

References blockSize_, file_, filename_, fileSize_, indexEnd_, mode_, and date::detail::trunc().

Here is the call graph for this function:

◆ GetBlockSize()

size_t YCompoundFiles::Block::GetBlockSize ( ) const
inline

Definition at line 91 of file BasicExcel.hpp.

References blockSize_.

◆ Insert()

bool YCompoundFiles::Block::Insert ( size_t  index,
const char *  block 
)

Definition at line 176 of file BasicExcel.cpp.

References indexEnd_, mode_, Move(), and Write().

Referenced by YCompoundFiles::CompoundFile::ExpandBATArray(), and YCompoundFiles::CompoundFile::WriteData().

Here is the call graph for this function:

◆ IsOpen()

bool YCompoundFiles::Block::IsOpen ( )

Definition at line 82 of file BasicExcel.cpp.

References file_.

Referenced by YCompoundFiles::CompoundFile::IsOpen().

◆ Move()

bool YCompoundFiles::Block::Move ( size_t  from,
size_t  to 
)

Definition at line 149 of file BasicExcel.cpp.

References indexEnd_, mode_, and Swap().

Referenced by Insert().

Here is the call graph for this function:

◆ Open()

bool YCompoundFiles::Block::Open ( const wchar_t *  filename,
std::ios_base::openmode  mode = std::ios_base::in | std::ios_base::out 
)

Definition at line 33 of file BasicExcel.cpp.

References blockSize_, Close(), file_, filename_, fileSize_, indexEnd_, mode_, and wcstombs().

Referenced by Create().

Here is the call graph for this function:

◆ Read()

bool YCompoundFiles::Block::Read ( size_t  index,
char *  block 
)

◆ SetBlockSize()

void YCompoundFiles::Block::SetBlockSize ( size_t  size)
inline

Definition at line 92 of file BasicExcel.hpp.

References blockSize_, fileSize_, and indexEnd_.

Referenced by YCompoundFiles::CompoundFile::LoadHeader().

◆ Swap()

bool YCompoundFiles::Block::Swap ( size_t  index1,
size_t  index2 
)

Definition at line 123 of file BasicExcel.cpp.

References blockSize_, indexEnd_, mode_, Read(), and Write().

Referenced by Move().

Here is the call graph for this function:

◆ Write()

bool YCompoundFiles::Block::Write ( size_t  index,
const char *  block 
)

Member Data Documentation

◆ blockSize_

size_t YCompoundFiles::Block::blockSize_
protected

Definition at line 102 of file BasicExcel.hpp.

Referenced by Close(), Erase(), GetBlockSize(), Open(), Read(), SetBlockSize(), Swap(), and Write().

◆ file_

std::fstream YCompoundFiles::Block::file_
protected

Definition at line 101 of file BasicExcel.hpp.

Referenced by Close(), Create(), Erase(), IsOpen(), Open(), Read(), and Write().

◆ filename_

std::vector<char> YCompoundFiles::Block::filename_
protected

Definition at line 99 of file BasicExcel.hpp.

Referenced by Close(), Erase(), Open(), and Write().

◆ fileSize_

size_t YCompoundFiles::Block::fileSize_
protected

Definition at line 104 of file BasicExcel.hpp.

Referenced by Close(), Erase(), Open(), SetBlockSize(), and Write().

◆ indexEnd_

size_t YCompoundFiles::Block::indexEnd_
protected

Definition at line 103 of file BasicExcel.hpp.

Referenced by Close(), Erase(), Insert(), Move(), Open(), Read(), SetBlockSize(), Swap(), and Write().

◆ mode_

std::ios_base::openmode YCompoundFiles::Block::mode_
protected

Definition at line 100 of file BasicExcel.hpp.

Referenced by Erase(), Insert(), Move(), Open(), Read(), Swap(), and Write().


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