| Exiv2

Loading...
Searching...
No Matches
List of all members
Exiv2::Internal::IoWrapper Class Reference

Simple IO wrapper to ensure that the header is only written if there is any other data at all. More...

`#include <tiffcomposite_int.hpp>`

## Public Member Functions
Creators
| IoWrapper (BasicIo &io, const byte *pHeader, size_t size, OffsetWriter *pow)

## Manipulators
size_t | write (const byte *pData, size_t wcount)
| Wraps the corresponding BasicIo::write() method.
int | putb (byte data)
| Wraps the corresponding BasicIo::putb() method.
void | setTarget (int id, size_t target)
| Wrapper for OffsetWriter::setTarget(), using an int instead of the enum to reduce include deps.

## Detailed Description

Simple IO wrapper to ensure that the header is only written if there is any other data at all.

The wrapper is initialized with an IO reference and a pointer to a TIFF header. Subsequently the wrapper is used by all TIFF write methods. It takes care that the TIFF header is written to the IO first before any other output and only if there is any other data.

## Constructor & Destructor Documentation

## ◆ IoWrapper()

Exiv2::Internal::IoWrapper::IoWrapper | ( | BasicIo & | io,
|  | const byte * | pHeader,
|  | size_t | size,
|  | OffsetWriter * | pow )

brief Constructor.

The IO wrapper owns none of the objects passed in so the caller is responsible to keep them alive.

## Member Function Documentation

## ◆ putb()

int Exiv2::Internal::IoWrapper::putb | ( | byte | data | ) |

Wraps the corresponding BasicIo::putb() method.

Writes the TIFF header to the IO, if it hasn't been written yet, followed by the data passed in the argument.

Referenced by Exiv2::Internal::TiffDirectory::doWrite(), Exiv2::Internal::TiffDataEntry::doWriteData(), Exiv2::Internal::TiffSubIfd::doWriteData(), and Exiv2::Internal::TiffImageEntry::doWriteImage().

## ◆ write()

size_t Exiv2::Internal::IoWrapper::write | ( | const byte * | pData,
|  | size_t | wcount )

Wraps the corresponding BasicIo::write() method.

Writes the TIFF header to the IO, if it hasn't been written yet, followed by the data passed in the arguments.

Referenced by Exiv2::Internal::TiffBinaryArray::doWrite(), Exiv2::Internal::TiffBinaryElement::doWrite(), Exiv2::Internal::TiffDataEntry::doWrite(), Exiv2::Internal::TiffDirectory::doWrite(), Exiv2::Internal::TiffEntryBase::doWrite(), Exiv2::Internal::TiffImageEntry::doWrite(), Exiv2::Internal::TiffSubIfd::doWrite(), Exiv2::Internal::TiffDataEntry::doWriteData(), Exiv2::Internal::TiffImageEntry::doWriteImage(), Exiv2::Internal::Casio2MnHeader::write(), Exiv2::Internal::FujiMnHeader::write(), Exiv2::Internal::Nikon2MnHeader::write(), Exiv2::Internal::Nikon3MnHeader::write(), Exiv2::Internal::Olympus2MnHeader::write(), Exiv2::Internal::OlympusMnHeader::write(), Exiv2::Internal::OMSystemMnHeader::write(), Exiv2::Internal::PanasonicMnHeader::write(), Exiv2::Internal::PentaxDngMnHeader::write(), Exiv2::Internal::PentaxMnHeader::write(), Exiv2::Internal::SigmaMnHeader::write(), and Exiv2::Internal::SonyMnHeader::write().

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

- tiffcomposite_int.hpp
- tiffcomposite_int.cpp