Exiv2
Loading...
Searching...
No Matches
Exiv2::FileIo::Impl Class Reference

Internal Pimpl structure of class FileIo. More...

Classes

struct  StructStat
 Simple struct stat wrapper for internal use. More...

Public Types

enum  OpMode { opRead , opWrite , opSeek }
 Mode of operation.

Public Member Functions

 Impl (std::string path)
 Constructor.
int switchMode (OpMode opMode)
 Switch to a new access mode, reopening the file if needed. Optimized to only reopen the file when it is really necessary.
int stat (StructStat &buf) const
 stat wrapper for internal use
 Impl (const Impl &)=delete
 Copy constructor.
Imploperator= (const Impl &)=delete
 Assignment.

Public Attributes

std::string path_
 (Standard) path
std::string openMode_
 File open mode.
FILE * fp_ {}
 File stream pointer.
OpMode opMode_ {opSeek}
 File open mode.
bytepMappedArea_ {}
 Pointer to the memory-mapped area.
size_t mappedLength_ {}
 Size of the memory-mapped area.
bool isMalloced_ {}
 Is the mapped area allocated?
bool isWriteable_ {}
 Can the mapped area be written to?

Detailed Description

Internal Pimpl structure of class FileIo.

Constructor & Destructor Documentation

◆ Impl() [1/2]

Exiv2::FileIo::Impl::Impl ( std::string path)
explicit

Constructor.

References Exiv2::FileIo::path(), and path_.

Referenced by Impl(), and operator=().

◆ Impl() [2/2]

Exiv2::FileIo::Impl::Impl ( const Impl & )
delete

Copy constructor.

References Impl().

Member Function Documentation

◆ operator=()

Impl & Exiv2::FileIo::Impl::operator= ( const Impl & )
delete

Assignment.

References Impl().

◆ stat()

int Exiv2::FileIo::Impl::stat ( StructStat & buf) const

stat wrapper for internal use

References path_, Exiv2::FileIo::Impl::StructStat::st_mode, Exiv2::FileIo::Impl::StructStat::st_size, and stat().

Referenced by stat().

◆ switchMode()

int Exiv2::FileIo::Impl::switchMode ( OpMode opMode)

Switch to a new access mode, reopening the file if needed. Optimized to only reopen the file when it is really necessary.

Parameters
opModeThe mode to switch to.
Returns
0 if successful

References fp_, openMode_, opMode_, and path_.

Member Data Documentation

◆ fp_

FILE* Exiv2::FileIo::Impl::fp_ {}

File stream pointer.

Referenced by switchMode().

◆ openMode_

std::string Exiv2::FileIo::Impl::openMode_

File open mode.

Referenced by switchMode().

◆ opMode_

OpMode Exiv2::FileIo::Impl::opMode_ {opSeek}

File open mode.

Referenced by switchMode().

◆ path_

std::string Exiv2::FileIo::Impl::path_

(Standard) path

Referenced by Impl(), stat(), and switchMode().


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