basicio.hpp File Reference

Simple binary IO abstraction. More...

#include "types.hpp"
#include <string>
#include <memory>

Include dependency graph for basicio.hpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Namespaces

namespace  Exiv2

Classes

class  Exiv2::BasicIo
 An interface for simple binary IO. More...
class  Exiv2::IoCloser
 Utility class that closes a BasicIo instance upon destruction. Meant to be used as a stack variable in functions that need to ensure BasicIo instances get closed. Useful when functions return errors from many locations. More...
class  Exiv2::FileIo
 Provides binary file IO by implementing the BasicIo interface. More...
class  Exiv2::MemIo
 Provides binary IO on blocks of memory by implementing the BasicIo interface. A copy-on-write implementation ensures that the data passed in is only copied when necessary, i.e., as soon as data is written to the MemIo. The original data is only used for reading. If writes are performed, the changed data can be retrieved using the read methods (since the data used in construction is never modified). More...

Functions

EXIV2API DataBuf readFile (const std::string &path)
 Read file path into a DataBuf, which is returned.
EXIV2API long writeFile (const DataBuf &buf, const std::string &path)
 Write DataBuf buf to file path.

Detailed Description

Simple binary IO abstraction.

Version:
Rev
1973
Author:
Brad Schick (brad) brad@robotbattle.com
Date:
04-Dec-04, brad: created

Function Documentation

EXIV2API DataBuf readFile const std::string &  path  ) 
 

Read file path into a DataBuf, which is returned.

Returns:
Buffer containing the file.
Exceptions:
Error In case of failure.

EXIV2API long writeFile const DataBuf &  buf,
const std::string &  path
 

Write DataBuf buf to file path.

Returns:
Return the number of bytes written.
Exceptions:
Error In case of failure.


Generated on Thu Dec 31 03:57:37 2009 for Exiv2 by  doxygen 1.3.9.1