dng_stream Class Reference#include <dng_stream.h>
Inheritance diagram for dng_stream:
![]()
Detailed DescriptionBase stream abstraction. Has support for going between stream and pointer abstraction.Constructor & Destructor Documentation
Construct a stream with initial data.
Member Function Documentation
Return the entire stream as a single memory block. This works for all streams, but requires copying the data to a new buffer.
References dng_memory_allocator::Allocate(), Flush(), Get(), Length(), SetReadPosition(), and ThrowProgramError(). Referenced by dng_iptc::Spool().
Getter for whether data in stream is big endian.
Referenced by LittleEndian(), dng_image_writer::WriteDNG(), and dng_image_writer::WriteTIFFWithProfile().
Copy a specified number of bytes to a target stream.
Reimplemented in dng_memory_stream. References dng_memory_data::Buffer(), Get(), and Put(). Referenced by DuplicateStream().
Return pointer to stream contents if the stream is entirely available as a single memory block, NULL otherwise.
Makes the target stream a copy of this stream.
References CopyToStream(), Flush(), Length(), SetLength(), SetReadPosition(), and SetWritePosition().
Get data from stream. Exception is thrown and no data is read if insufficient data available in stream.
References Flush(), Length(), dng_abort_sniffer::SniffForAbort(), and ThrowEndOfFile(). Referenced by AsMemoryBlock(), CopyToStream(), Get_real64(), Get_uint16(), Get_uint32(), Get_uint64(), Get_uint8(), and dng_iptc::Parse().
Get an 8-bit character string from stream and advance read position. Routine always reads until a NUL character (8-bits of zero) is read. (That is, only maxLength bytes will be returned in buffer, but the stream is always advanced until a NUL is read or EOF is reached.)
References Get_uint8().
Get one 16-bit integer from stream and advance read position. Byte swap if byte swapping is turned on.
References Get_uint16(). Referenced by TagValue_int32().
Get one 32-bit integer from stream and advance read position. Byte swap if byte swapping is turned on.
References Get_uint32(). Referenced by TagValue_int32(), TagValue_real64(), TagValue_srational(), and TagValue_urational().
Get one 64-bit integer from stream and advance read position. Byte swap if byte swapping is turned on.
References Get_uint64().
Get one 8-bit integer from stream and advance read position.
References Get_uint8(). Referenced by dng_iptc::Parse(), and TagValue_int32().
Get one 32-bit IEEE floating-point number from stream and advance read position. Byte swap if byte swapping is turned on.
References Get_uint32(). Referenced by dng_camera_profile::Parse(), and TagValue_real64().
Get one 64-bit IEEE floating-point number from stream and advance read position. Byte swap if byte swapping is turned on.
References Get(), and Get_uint32(). Referenced by TagValue_real64().
Get an unsigned 16-bit integer from stream and advance read position. Byte swap if byte swapping is turned on.
References Get(). Referenced by Get_int16(), Get_UString(), dng_iptc::Parse(), dng_info::Parse(), and TagValue_uint32().
Get an unsigned 32-bit integer from stream and advance read position. Byte swap if byte swapping is turned on.
References Get(). Referenced by Get_int32(), Get_real32(), Get_real64(), Get_uint64(), dng_info::Parse(), TagValue_real64(), TagValue_uint32(), and TagValue_urational().
Get an unsigned 64-bit integer from stream and advance read position. Byte swap if byte swapping is turned on.
References Get(), and Get_uint32(). Referenced by Get_int64().
Get an unsigned 8-bit integer from stream and advance read position.
References Get(). Referenced by Get_CString(), Get_int8(), dng_iptc::Parse(), and TagValue_uint32().
Get a 16-bit character string from stream and advance read position. 16-bit characters are truncated to 8-bits. Routine always reads until a NUL character (16-bits of zero) is read. (That is, only maxLength bytes will be returned in buffer, but the stream is always advanced until a NUL is read or EOF is reached.)
References Get_uint16().
Getter for length of data in stream.
Referenced by AsMemoryBlock(), dng_memory_stream::CopyToStream(), DuplicateStream(), Get(), dng_iptc::Parse(), dng_info::Parse(), Put(), Put_uint8(), SetLength(), SetReadPosition(), dng_iptc::Spool(), dng_image_writer::WriteDNG(), and dng_image_writer::WriteTIFFWithProfile().
Getter for whether data in stream is big endian.
References BigEndian().
Getter for offset in original file.
Getter for current offset in stream.
Referenced by dng_memory_stream::CopyToStream(), PadAlign2(), PadAlign4(), dng_iptc::Parse(), dng_info::Parse(), PositionInOriginalFile(), Skip(), dng_image_writer::WriteDNG(), and dng_image_writer::WriteTIFFWithProfile().
Getter for current position in original file, taking into account OffsetInOriginalFile stream data was taken from.
References Position(). Referenced by dng_info::Parse().
Write data to stream.
References Flush(), Length(), and dng_abort_sniffer::SniffForAbort(). Referenced by CopyToStream(), dng_memory_stream::CopyToStream(), Put_real32(), Put_real64(), Put_uint16(), Put_uint32(), Put_uint64(), Put_uint8(), PutZeros(), and dng_iptc::Spool().
Put one 16-bit integer to stream and advance write position. Byte swap if byte swapping is turned on.
References Put_uint16().
Put one 32-bit integer to stream and advance write position. Byte swap if byte swapping is turned on.
References Put_uint32().
Put one 64-bit integer to stream and advance write position. Byte swap if byte swapping is turned on.
References Put_uint64().
Put one 8-bit integer to stream and advance write position.
References Put_uint8().
Put one 32-bit IEEE floating-point number to stream and advance write position. Byte swap if byte swapping is turned on.
References Put(), and Put_uint32().
Put one 64-bit IEEE floating-point number to stream and advance write position. Byte swap if byte swapping is turned on.
References Put(), and Put_uint32().
Put an unsigned 16-bit integer to stream and advance write position. Byte swap if byte swapping is turned on.
References Put(). Referenced by Put_int16(), dng_iptc::Spool(), dng_image_writer::WriteDNG(), and dng_image_writer::WriteTIFFWithProfile().
Put an unsigned 32-bit integer to stream and advance write position. Byte swap if byte swapping is turned on.
References Put(). Referenced by Put_int32(), Put_real32(), Put_real64(), Put_uint64(), dng_image_writer::WriteDNG(), and dng_image_writer::WriteTIFFWithProfile().
Put an unsigned 64-bit integer to stream and advance write position. Byte swap if byte swapping is turned on.
References Put(), and Put_uint32(). Referenced by Put_int64().
Put an unsigned 8-bit integer to stream and advance write position.
References Length(), and Put(). Referenced by Put_int8(), PutZeros(), and dng_iptc::Spool().
Writes the specified number of zero bytes to stream.
References dng_memory_data::Buffer(), Put(), and Put_uint8(). Referenced by PadAlign2(), and PadAlign4().
Setter for whether data in stream is big endian.
Referenced by dng_iptc::Parse(), dng_info::Parse(), SetLittleEndian(), and dng_iptc::Spool().
Set length of available data.
References Flush(), and Length(). Referenced by DuplicateStream(), dng_image_writer::WriteDNG(), and dng_image_writer::WriteTIFFWithProfile().
Setter for whether data in stream is big endian.
References SetBigEndian(). Referenced by dng_info::Parse().
Putter for sniffer associated with stream.
Setter for whether stream is swapping byte order on input/output.
Skip forward in stream.
References Position(), and SetReadPosition().
Getter for sniffer associated with stream.
Getter for whether stream is swapping byte order on input/output.
Get a value of size indicated by tag type from stream and advance read position. Byte swap if byte swapping is turned on and tag type is larger than a byte. Value is returned as a 32-bit integer.
References Get_int16(), Get_int32(), Get_int8(), and TagValue_real64(). Referenced by TagValue_real64(), and TagValue_urational().
Get a value of size indicated by tag type from stream and advance read position. Byte swap if byte swapping is turned on and tag type is larger than a byte. Value is returned as a 64-bit IEEE floating-point number.
References Get_int32(), Get_real32(), Get_real64(), Get_uint32(), TagValue_int32(), and TagValue_uint32(). Referenced by TagValue_int32(), TagValue_srational(), TagValue_uint32(), and TagValue_urational().
Get a value of size indicated by tag type from stream and advance read position. Byte swap if byte swapping is turned on and tag type is larger than a byte. Value is returned as a dng_srational.
References Get_int32(), and TagValue_real64().
Get a value of size indicated by tag type from stream and advance read position. Byte swap if byte swapping is turned on and tag type is larger than a byte. Value is returned as an unsigned 32-bit integer.
References Get_uint16(), Get_uint32(), Get_uint8(), and TagValue_real64(). Referenced by TagValue_real64(), and TagValue_urational().
Get a value of size indicated by tag type from stream and advance read position. Byte swap if byte swapping is turned on and tag type is larger than a byte. Value is returned as a dng_urational.
References Get_int32(), Get_uint32(), TagValue_int32(), TagValue_real64(), and TagValue_uint32().
The documentation for this class was generated from the following files:
|