dng_memory_stream Class Reference

A dng_stream which can be read from or written to memory. More...

#include <dng_memory_stream.h>

Inheritance diagram for dng_memory_stream:

dng_stream

List of all members.


Public Member Functions

 dng_memory_stream (dng_memory_allocator &allocator, dng_abort_sniffer *sniffer=NULL, uint32 pageSize=64 *1024)
virtual void CopyToStream (dng_stream &dstStream, uint64 count)

Protected Member Functions

virtual uint64 DoGetLength ()
virtual void DoRead (void *data, uint32 count, uint64 offset)
virtual void DoSetLength (uint64 length)
virtual void DoWrite (const void *data, uint32 count, uint64 offset)

Protected Attributes

dng_memory_allocatorfAllocator
uint32 fPageSize
uint32 fPageCount
uint32 fPagesAllocated
dng_memory_block ** fPageList
uint64 fMemoryStreamLength

Detailed Description

A dng_stream which can be read from or written to memory.

Stream is populated via writing and either read or accessed by asking for contents as a pointer.


Constructor & Destructor Documentation

dng_memory_stream::dng_memory_stream ( dng_memory_allocator allocator,
dng_abort_sniffer sniffer = NULL,
uint32  pageSize = 64 * 1024 
)

Construct a new memory-based stream.

Parameters:
allocator Allocator to use to allocate memory in stream as needed.
sniffer If non-NULL used to check for user cancellation.
pageSize Unit of allocation for data stored in stream.


Member Function Documentation

void dng_memory_stream::CopyToStream ( dng_stream dstStream,
uint64  count 
) [virtual]

Copy a specified number of bytes to a target stream.

Parameters:
dstStream The target stream.
count The number of bytes to copy.

Reimplemented from dng_stream.

References dng_memory_block::Buffer_uint8(), dng_stream::Flush(), dng_stream::Length(), dng_stream::Position(), dng_stream::Put(), dng_stream::SetReadPosition(), and ThrowEndOfFile().


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

Copyright © 2006-2009 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google