foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
fileRestorePositionScope

#include <filesystem_helper.h>

Public Member Functions

 fileRestorePositionScope (file::ptr f, abort_callback &a)
 
 ~fileRestorePositionScope ()
 

Private Attributes

abort_callbackm_abort
 
file::ptr m_file
 
t_filesize m_offset
 

Detailed Description

Definition at line 728 of file filesystem_helper.h.

Constructor & Destructor Documentation

fileRestorePositionScope::fileRestorePositionScope ( file::ptr  f,
abort_callback a 
)
inline

Definition at line 730 of file filesystem_helper.h.

730  : m_file(f), m_abort(a) {
731  m_offset = f->get_position(a);
732  }
fileRestorePositionScope::~fileRestorePositionScope ( )
inline

Definition at line 733 of file filesystem_helper.h.

733  {
734  try {
735  if (!m_abort.is_aborting()) m_file->seek(m_offset, m_abort);
736  } catch(...) {}
737  }

Field Documentation

abort_callback& fileRestorePositionScope::m_abort
private

Definition at line 741 of file filesystem_helper.h.

file::ptr fileRestorePositionScope::m_file
private

Definition at line 739 of file filesystem_helper.h.

t_filesize fileRestorePositionScope::m_offset
private

Definition at line 740 of file filesystem_helper.h.


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