DocumentationOverviewBuilding ASL Documentation Library Wiki Docs Indices Browse Perforce More InfoRelease NotesWiki Site Search License Success Stories Contributors MediaDownloadPerforce Depots SupportASL SourceForge HomeMailing Lists Discussion Forums Report Bugs Suggest Features Contribute to ASL RSSShort-text newsFull-text news File releases Other Adobe ProjectsAdobe AirAdobe GIL Adobe Labs Adobe Media Gallery Adobe XMP Tamarin project (Mozilla Foundation) Other ResourcesBoostRIAForge SGI STL |
dng_memory_stream.hGo to the documentation of this file.00001 /*****************************************************************************/ 00002 // Copyright 2006-2007 Adobe Systems Incorporated 00003 // All Rights Reserved. 00004 // 00005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 00006 // accordance with the terms of the Adobe license agreement accompanying it. 00007 /*****************************************************************************/ 00008 00009 /* $Id: //mondo/workarea/stern/camera_raw/dng_sdk/source/dng_memory_stream.h#7 $ */ 00010 /* $DateTime: 2007/12/13 23:45:42 $ */ 00011 /* $Change: 405902 $ */ 00012 /* $Author: stern $ */ 00013 00018 /*****************************************************************************/ 00019 00020 #ifndef __dng_memory_stream__ 00021 #define __dng_memory_stream__ 00022 00023 /*****************************************************************************/ 00024 00025 #include "dng_stream.h" 00026 00027 /*****************************************************************************/ 00028 00032 00033 class dng_memory_stream: public dng_stream 00034 { 00035 00036 protected: 00037 00038 dng_memory_allocator &fAllocator; 00039 00040 uint32 fPageSize; 00041 00042 uint32 fPageCount; 00043 uint32 fPagesAllocated; 00044 00045 dng_memory_block **fPageList; 00046 00047 uint64 fMemoryStreamLength; 00048 00049 public: 00050 00055 00056 dng_memory_stream (dng_memory_allocator &allocator, 00057 dng_abort_sniffer *sniffer = NULL, 00058 uint32 pageSize = 64 * 1024); 00059 00060 virtual ~dng_memory_stream (); 00061 00062 virtual void CopyToStream (dng_stream &dstStream, 00063 uint64 count); 00064 00065 protected: 00066 00067 virtual uint64 DoGetLength (); 00068 00069 virtual void DoRead (void *data, 00070 uint32 count, 00071 uint64 offset); 00072 00073 virtual void DoSetLength (uint64 length); 00074 00075 virtual void DoWrite (const void *data, 00076 uint32 count, 00077 uint64 offset); 00078 00079 private: 00080 00081 // Hidden copy constructor and assignment operator. 00082 00083 dng_memory_stream (const dng_memory_stream &stream); 00084 00085 dng_memory_stream & operator= (const dng_memory_stream &stream); 00086 00087 }; 00088 00089 /*****************************************************************************/ 00090 00091 #endif 00092 00093 /*****************************************************************************/ |