#include <CFileMap.h>
Inheritance diagram for AxPipe::CSegMap:
Public Member Functions | |
CSegMap (void *pOwner, size_t cb, void *pv, void *pView, longlong llPos, bool fReadOnly=false) | |
Construct with Owner, size, buffer pointer, view, file pos and possibly readonly. | |
virtual | ~CSegMap () |
Unmap the view, if any. | |
longlong | GetPos () |
Get the corresponding file pointer. | |
virtual void * | RTClassId () |
Run time polymorphic type information. | |
bool | IsOwner (void *pOwner) |
Check if the provided opaque pointer matches the owner given on construction. | |
Static Public Member Functions | |
void * | ClassId () |
Compile time polymorphic type information. | |
Private Attributes | |
longlong | m_llPos |
The file position in the backing file of the segment. | |
void * | m_pView |
The corresponding mapped view. | |
void * | m_pOwner |
Implement owner-id functions, opaque owner id here. |
CSegMap is able to release a view instead of delete'ing upon destruction. It also implements run time typing to distinguish it, as well as an owner mechanism whereby a class can tag and subsequently recognize a segment as on that it 'owns' and thus handles.
The actual mapping of the file is handled outside of this class, but it can, and will, unmap the view.
Definition at line 57 of file CFileMap.h.
|
Construct with Owner, size, buffer pointer, view, file pos and possibly readonly.
Definition at line 78 of file CFileMap.cpp. |
|
Compile time polymorphic type information.
Reimplemented from AxPipe::CSeg. Definition at line 102 of file CFileMap.cpp. Referenced by RTClassId(). |
|
Get the corresponding file pointer.
Definition at line 95 of file CFileMap.cpp. References AxPipe::longlong, and m_llPos. Referenced by AxPipe::CSinkMemFile::Out(). |
|
Check if the provided opaque pointer matches the owner given on construction.
Definition at line 118 of file CFileMap.cpp. References m_pOwner. |
|
Run time polymorphic type information.
Reimplemented from AxPipe::CSeg. Definition at line 110 of file CFileMap.cpp. References ClassId(). |