yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::Transaction Class Reference

#include <transaction.h>

Collaboration diagram for yaze::Transaction:

Classes

struct  Operation
 

Public Member Functions

 Transaction (Rom &rom)
 
TransactionWriteByte (int address, uint8_t value)
 
TransactionWriteWord (int address, uint16_t value)
 
TransactionWriteLong (int address, uint32_t value)
 
TransactionWriteVector (int address, const std::vector< uint8_t > &data)
 
TransactionWriteColor (int address, const gfx::SnesColor &color)
 
absl::Status Commit ()
 
void Rollback ()
 

Private Types

enum class  OperationType {
  kWriteByte , kWriteWord , kWriteLong , kWriteVector ,
  kWriteColor
}
 

Private Attributes

Romrom_
 
absl::Status status_
 
std::vector< Operationoperations_
 

Detailed Description

Definition at line 21 of file transaction.h.

Member Enumeration Documentation

◆ OperationType

enum class yaze::Transaction::OperationType
strongprivate
Enumerator
kWriteByte 
kWriteWord 
kWriteLong 
kWriteVector 
kWriteColor 

Definition at line 128 of file transaction.h.

Constructor & Destructor Documentation

◆ Transaction()

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

Definition at line 23 of file transaction.h.

References rom_.

Referenced by WriteByte(), WriteColor(), WriteLong(), WriteVector(), and WriteWord().

Member Function Documentation

◆ WriteByte()

Transaction & yaze::Transaction::WriteByte ( int address,
uint8_t value )
inline

Definition at line 25 of file transaction.h.

References kWriteByte, operations_, rom_, status_, and Transaction().

Referenced by yaze::test::TEST_F().

Here is the call graph for this function:

◆ WriteWord()

Transaction & yaze::Transaction::WriteWord ( int address,
uint16_t value )
inline

Definition at line 39 of file transaction.h.

References kWriteWord, operations_, rom_, status_, and Transaction().

Referenced by yaze::test::TEST_F().

Here is the call graph for this function:

◆ WriteLong()

Transaction & yaze::Transaction::WriteLong ( int address,
uint32_t value )
inline

Definition at line 53 of file transaction.h.

References kWriteLong, operations_, rom_, status_, and Transaction().

Here is the call graph for this function:

◆ WriteVector()

Transaction & yaze::Transaction::WriteVector ( int address,
const std::vector< uint8_t > & data )
inline

Definition at line 67 of file transaction.h.

References kWriteVector, operations_, rom_, status_, and Transaction().

Here is the call graph for this function:

◆ WriteColor()

Transaction & yaze::Transaction::WriteColor ( int address,
const gfx::SnesColor & color )
inline

Definition at line 81 of file transaction.h.

References kWriteColor, operations_, rom_, status_, and Transaction().

Here is the call graph for this function:

◆ Commit()

absl::Status yaze::Transaction::Commit ( )
inline

Definition at line 96 of file transaction.h.

References Rollback(), and status_.

Referenced by yaze::test::TEST_F().

Here is the call graph for this function:

◆ Rollback()

void yaze::Transaction::Rollback ( )
inline

Definition at line 103 of file transaction.h.

References kWriteByte, kWriteColor, kWriteLong, kWriteVector, kWriteWord, operations_, and rom_.

Referenced by Commit().

Member Data Documentation

◆ rom_

Rom& yaze::Transaction::rom_
private

◆ status_

absl::Status yaze::Transaction::status_
private

Definition at line 137 of file transaction.h.

Referenced by Commit(), WriteByte(), WriteColor(), WriteLong(), WriteVector(), and WriteWord().

◆ operations_

std::vector<Operation> yaze::Transaction::operations_
private

Definition at line 138 of file transaction.h.

Referenced by Rollback(), WriteByte(), WriteColor(), WriteLong(), WriteVector(), and WriteWord().


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