OpendTect  6.3
Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions | List of all members
SafeWriteHelper Class Reference

Helps to write a new version of a file. On write error rollback, otherwise commit. More...

Public Member Functions

 SafeWriteHelper (const char *, bool keepbak=false)
 
 ~SafeWriteHelper ()
 
od_ostreamstream ()
 
bool commit ()
 
void rollback ()
 

Protected Member Functions

void closeStream ()
 

Protected Attributes

od_ostream strm_
 
bool closed_
 
const bool keepbak_
 
const BufferString fnm_
 

Static Private Member Functions

static uiString tr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 
static uiString legacyTr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 

Detailed Description

Helps to write a new version of a file. On write error rollback, otherwise commit.

Constructor & Destructor Documentation

SafeWriteHelper::SafeWriteHelper ( const char *  ,
bool  keepbak = false 
)
SafeWriteHelper::~SafeWriteHelper ( )

Member Function Documentation

void SafeWriteHelper::closeStream ( )
protected
bool SafeWriteHelper::commit ( )
static uiString SafeWriteHelper::legacyTr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate
void SafeWriteHelper::rollback ( )
od_ostream& SafeWriteHelper::stream ( )
inline
static uiString SafeWriteHelper::tr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate

Member Data Documentation

bool SafeWriteHelper::closed_
protected
const BufferString SafeWriteHelper::fnm_
protected
const bool SafeWriteHelper::keepbak_
protected
od_ostream SafeWriteHelper::strm_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017