yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::ScopedRomTransaction Class Reference

#include <transaction.h>

Collaboration diagram for yaze::ScopedRomTransaction:

Public Member Functions

 ScopedRomTransaction (Rom &rom)
 
 ScopedRomTransaction (const ScopedRomTransaction &)=delete
 
ScopedRomTransactionoperator= (const ScopedRomTransaction &)=delete
 
 ~ScopedRomTransaction ()
 
void Commit ()
 
void Rollback ()
 

Private Attributes

Romrom_
 
std::vector< uint8_t > data_
 
std::string filename_
 
bool dirty_ = false
 
bool committed_ = false
 

Detailed Description

Definition at line 170 of file transaction.h.

Constructor & Destructor Documentation

◆ ScopedRomTransaction() [1/2]

yaze::ScopedRomTransaction::ScopedRomTransaction ( Rom & rom)
inlineexplicit

Definition at line 172 of file transaction.h.

◆ ScopedRomTransaction() [2/2]

yaze::ScopedRomTransaction::ScopedRomTransaction ( const ScopedRomTransaction & )
delete

◆ ~ScopedRomTransaction()

yaze::ScopedRomTransaction::~ScopedRomTransaction ( )
inline

Definition at line 181 of file transaction.h.

References committed_, and Rollback().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

ScopedRomTransaction & yaze::ScopedRomTransaction::operator= ( const ScopedRomTransaction & )
delete

◆ Commit()

◆ Rollback()

void yaze::ScopedRomTransaction::Rollback ( )
inline

Definition at line 189 of file transaction.h.

References committed_, data_, dirty_, yaze::Rom::Expand(), filename_, yaze::Rom::mutable_vector(), rom_, yaze::Rom::set_dirty(), and yaze::Rom::set_filename().

Referenced by ~ScopedRomTransaction().

Here is the call graph for this function:

Member Data Documentation

◆ rom_

Rom& yaze::ScopedRomTransaction::rom_
private

Definition at line 202 of file transaction.h.

Referenced by Rollback().

◆ data_

std::vector<uint8_t> yaze::ScopedRomTransaction::data_
private

Definition at line 203 of file transaction.h.

Referenced by Rollback().

◆ filename_

std::string yaze::ScopedRomTransaction::filename_
private

Definition at line 204 of file transaction.h.

Referenced by Rollback().

◆ dirty_

bool yaze::ScopedRomTransaction::dirty_ = false
private

Definition at line 205 of file transaction.h.

Referenced by Rollback().

◆ committed_

bool yaze::ScopedRomTransaction::committed_ = false
private

Definition at line 206 of file transaction.h.

Referenced by Commit(), Rollback(), and ~ScopedRomTransaction().


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