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

FileConduit::VersionWin32::Win32MappedBuffer Class Reference

Inheritance diagram for FileConduit::VersionWin32::Win32MappedBuffer:

MappedBuffer List of all members.

Public Member Functions

 this (FileConduit parent)
 ~this ()
void close ()
void flush ()

Private Member Functions

 this ()
 this (uint capacity=0)
 this (void[] data)
 this (void[] data, uint readable)
void setPosition (uint position)
long seek (long offset, ISeekable.SeekAnchor anchor)
uint writable ()
protected void * copy (void *src, uint size)
int write (int(*dg)(void[]))
IBuffer compress ()
IBuffer clear ()
void setConduit (IConduit conduit)

Private Attributes

void * base
HANDLE mmFile
FileConduit parent

Detailed Description

Nested class to handle memory-mapped files. This should only be created via a utility method such as FileConduit.createMappedBuffer()

Definition at line 543 of file FileConduit.d.


Constructor & Destructor Documentation

~this  )  [inline]
 

Ensure this is closed when GC'd

Definition at line 592 of file FileConduit.d.

References Resource::close().


Member Function Documentation

this FileConduit  parent  )  [inline]
 

Construct a MappedBuffer upon the given FileConduit. One should set the file size using seek() and truncate() to setup the available working space.

Definition at line 558 of file FileConduit.d.

References ConduitStyle::access().

void close  )  [inline]
 

Close this mapped buffer

Reimplemented from MappedBuffer.

Definition at line 603 of file FileConduit.d.

void flush  )  [inline]
 

Flush dirty content out to the drive. This fails with error 33 if the file content is virgin. Opening a file for ReadWriteExists followed by a flush() will cause this.

Reimplemented from MappedBuffer.

Definition at line 624 of file FileConduit.d.

this  )  [inline, inherited]
 

Construct an empty MappedBuffer

Reimplemented from Buffer.

Definition at line 749 of file Buffer.d.

this uint  capacity = 0  )  [inline, inherited]
 

Construct a Buffer with the specified number of bytes.

Reimplemented in GrowableBuffer.

Definition at line 181 of file Buffer.d.

this void[]  data  )  [inline, inherited]
 

Prime buffer with an application-supplied array. There is no readable data present, and writing begins at position 0.

Definition at line 193 of file Buffer.d.

this void[]  data,
uint  readable
[inline, inherited]
 

Prime buffer with an application-supplied array, and indicate how much readable data is already there. A write operation will begin writing immediately after the existing content.

Definition at line 207 of file Buffer.d.

References Buffer::readable(), and Buffer::setContent().

void setPosition uint  position  )  [inline, inherited]
 

Set the read/write position

Definition at line 776 of file Buffer.d.

Referenced by testMappedFile().

long seek long  offset,
ISeekable.SeekAnchor  anchor
[inline, inherited]
 

Seek to the specified position within the buffer, and return the byte offset of the new location (relative to zero).

Definition at line 788 of file Buffer.d.

Referenced by FileConduit::VersionWin32::seek().

uint writable  )  [inline, inherited]
 

Return count of writable bytes available in buffer. This is calculated simply as capacity() - limit()

Reimplemented from Buffer.

Definition at line 810 of file Buffer.d.

protected void* copy void *  src,
uint  size
[inline, inherited]
 

Bulk copy of data from 'src'. Position is adjusted by 'size' bytes.

Reimplemented from Buffer.

Definition at line 822 of file Buffer.d.

int write int(*  dg)(void[])  )  [inline, inherited]
 

Exposes the raw data buffer at the current write position, The delegate is provided with a void[] representing space available within the buffer at the current write position.

The delegate should return the approriate number of bytes if it writes valid content, or IConduit.Eof on error.

Returns whatever the delegate returns.

Reimplemented from Buffer.

Definition at line 843 of file Buffer.d.

IBuffer compress  )  [inline, inherited]
 

Prohibit compress() from doing anything at all.

Reimplemented from Buffer.

Definition at line 861 of file Buffer.d.

IBuffer clear  )  [inline, inherited]
 

Prohibit clear() from doing anything at all.

Reimplemented from Buffer.

Definition at line 872 of file Buffer.d.

void setConduit IConduit  conduit  )  [inline, inherited]
 

Prohibit the setting of another IConduit

Reimplemented from Buffer.

Definition at line 883 of file Buffer.d.


Member Data Documentation

void* base [private]
 

Definition at line 545 of file FileConduit.d.

HANDLE mmFile [private]
 

Definition at line 546 of file FileConduit.d.

FileConduit parent [private]
 

Definition at line 547 of file FileConduit.d.


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:02 2004 for Mango by doxygen 1.3.6