Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::file::File Class Reference

Provide single file interface file date stored in multiple segment files on disk. Keeps each segment size below 2GB for OSes without large file support. More...

#include <File.hpp>

List of all members.

Public Types

typedef INT64 offset_type
typedef FILE_OFFSET library_offset_type

Public Member Functions

 File ()
 ~File ()
void open (const std::string &fileName, int mode)
void close ()
void read (void *buffer, offset_type count)
void write (const void *buffer, offset_type count)
void seekg (offset_type relativePosition, std::fstream::seekdir direction)
void seekp (offset_type relativePosition, std::fstream::seekdir direction)
offset_type tellg ()
offset_type tellp ()
offset_type gcount ()
int rdstate ()
offset_type size () const
void unlink ()

Static Public Member Functions

void unlink (const std::string &fileName)
void rename (const std::string &oldName, const std::string &newName)

Private Member Functions

void _appendSegment ()
offset_type _absolutePosition (offset_type relativePosition, offset_type currentPosition, std::fstream::seekdir direction) const
FileSegment_segmentForPosition (offset_type absolutePosition, FileSegment *guess)
void _validateReadPointer ()
void _validateWritePointer ()

Static Private Member Functions

std::string segmentName (const std::string &fileName, int segment)

Private Attributes

std::string _fileName
std::vector< FileSegment * > _segments
FileSegment_readSegment
FileSegment_writeSegment
offset_type _readPosition
offset_type _writePosition
offset_type _readCount
bool _readPointerValid
bool _writePointerValid
int _mode
int _state


Detailed Description

Provide single file interface file date stored in multiple segment files on disk. Keeps each segment size below 2GB for OSes without large file support.


Member Typedef Documentation

typedef FILE_OFFSET lemur::file::File::library_offset_type
 

typedef INT64 lemur::file::File::offset_type
 


Constructor & Destructor Documentation

lemur::file::File::File  ) 
 

lemur::file::File::~File  ) 
 


Member Function Documentation

lemur::file::File::offset_type lemur::file::File::_absolutePosition offset_type  relativePosition,
offset_type  currentPosition,
std::fstream::seekdir  direction
const [private]
 

void lemur::file::File::_appendSegment  )  [private]
 

lemur::file::File::FileSegment * lemur::file::File::_segmentForPosition offset_type  absolutePosition,
FileSegment guess
[private]
 

void lemur::file::File::_validateReadPointer  )  [private]
 

void lemur::file::File::_validateWritePointer  )  [private]
 

void lemur::file::File::close  ) 
 

lemur::file::File::offset_type lemur::file::File::gcount  ) 
 

void lemur::file::File::open const std::string &  fileName,
int  mode
 

int lemur::file::File::rdstate  ) 
 

void lemur::file::File::read void *  buffer,
offset_type  count
 

void lemur::file::File::rename const std::string &  oldName,
const std::string &  newName
[static]
 

void lemur::file::File::seekg offset_type  relativePosition,
std::fstream::seekdir  direction
 

void lemur::file::File::seekp offset_type  relativePosition,
std::fstream::seekdir  direction
 

std::string lemur::file::File::segmentName const std::string &  fileName,
int  segment
[static, private]
 

Provide single file interface file date stored in multiple segment files on disk. Keeps each segment size below 2GB for OSes without large file support.

lemur::file::File::offset_type lemur::file::File::size  )  const
 

lemur::file::File::offset_type lemur::file::File::tellg  ) 
 

lemur::file::File::offset_type lemur::file::File::tellp  ) 
 

void lemur::file::File::unlink const std::string &  fileName  )  [static]
 

void lemur::file::File::unlink  ) 
 

void lemur::file::File::write const void *  buffer,
offset_type  count
 


Member Data Documentation

std::string lemur::file::File::_fileName [private]
 

int lemur::file::File::_mode [private]
 

offset_type lemur::file::File::_readCount [private]
 

bool lemur::file::File::_readPointerValid [private]
 

offset_type lemur::file::File::_readPosition [private]
 

FileSegment* lemur::file::File::_readSegment [private]
 

std::vector<FileSegment*> lemur::file::File::_segments [private]
 

int lemur::file::File::_state [private]
 

bool lemur::file::File::_writePointerValid [private]
 

offset_type lemur::file::File::_writePosition [private]
 

FileSegment* lemur::file::File::_writeSegment [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:05 2010 for Lemur by doxygen 1.3.4