NCBI C++ ToolKit
|
Search Toolkit Book for CMemoryFileSegment
#include <corelib/ncbifile.hpp>
Public Member Functions | |
CMemoryFileSegment (SMemoryFileHandle &handle, SMemoryFileAttrs &attrs, TOffsetType offset, size_t length) | |
Constructor. More... | |
~CMemoryFileSegment (void) | |
Destructor. More... | |
void * | GetPtr (void) const |
Get pointer to beginning of data. More... | |
TOffsetType | GetOffset (void) const |
Get offset of the mapped area from beginning of file. More... | |
size_t | GetSize (void) const |
Get length of the mapped area. More... | |
void * | GetRealPtr (void) const |
Get pointer to beginning of really mapped data. More... | |
TOffsetType | GetRealOffset (void) const |
Get real offset of the mapped area from beginning of file. More... | |
size_t | GetRealSize (void) const |
Get real length of the mapped area. More... | |
bool | Flush (void) const |
Flush by writing all modified copies of memory pages to the underlying file. More... | |
bool | Unmap (void) |
Unmap file view from memory. More... | |
bool | MemMapAdvise (EMemMapAdvise advise) const |
Advise on mapped memory map usage. More... | |
Public Member Functions inherited from CMemoryFile_Base | |
CMemoryFile_Base (void) | |
Constructor. More... | |
Private Member Functions | |
void | x_Verify (void) const |
CMemoryFileSegment (const CMemoryFileSegment &) | |
void | operator= (const CMemoryFileSegment &) |
Private Attributes | |
void * | m_DataPtr |
Pointer to the beginning of the mapped area. More... | |
TOffsetType | m_Offset |
Requested starting offset of the. More... | |
size_t | m_Length |
Requested length of the mapped area. More... | |
void * | m_DataPtrReal |
Real pointer to the beginning of the mapped area which should be fried later. More... | |
TOffsetType | m_OffsetReal |
Corrected starting offset of the. More... | |
size_t | m_LengthReal |
Corrected length of the mapped area. More... | |
Friends | |
class | CMemoryFile |
Additional Inherited Members | |
Public Types inherited from CMemoryFile_Base | |
enum | EMemMapProtect { eMMP_Read , eMMP_Write , eMMP_ReadWrite } |
Which operations are permitted in memory map file. More... | |
enum | EMemMapShare { eMMS_Shared , eMMS_Private } |
Whether to share changes or not. More... | |
enum | EOpenMode { eCreate , eOpen , eExtend , eDefault = eOpen } |
Memory file open mode. More... | |
enum | EMemMapAdvise { eMMA_Normal = eMADV_Normal , eMMA_Random = eMADV_Random , eMMA_Sequential = eMADV_Sequential , eMMA_WillNeed = eMADV_WillNeed , eMMA_DontNeed = eMADV_DontNeed , eMMA_DoFork = eMADV_DoFork , eMMA_DontFork = eMADV_DontFork , eMMA_Mergeable = eMADV_Mergeable , eMMA_Unmergeable = eMADV_Unmergeable } |
What type of data access pattern will be used for mapped region. More... | |
typedef Int8 | TOffsetType |
Static Public Member Functions inherited from CMemoryFile_Base | |
static bool | IsSupported (void) |
Check if memory-mapping is supported by the C++ Toolkit on this platform. More... | |
static bool | MemMapAdviseAddr (void *addr, size_t len, EMemMapAdvise advise) |
Advise on memory map usage for specified region. More... | |
Define auxiliary class for mapping a memory file region of the file into the address space of the calling process.
Throws an exceptions on error.
Definition at line 2511 of file ncbifile.hpp.