yaze 0.3.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.

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_, yaze::Rom::ReadByte(), rom_, status_, and yaze::Rom::WriteByte().

Referenced by yaze::test::E2ETestSuite::RunTransactionSystemTest(), and 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_, yaze::Rom::ReadWord(), rom_, status_, and yaze::Rom::WriteWord().

Referenced by yaze::test::E2ETestSuite::RunTransactionSystemTest(), and 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_, yaze::Rom::ReadLong(), rom_, status_, and yaze::Rom::WriteLong().

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_, yaze::Rom::ReadByteVector(), rom_, status_, and yaze::Rom::WriteVector().

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_, yaze::Rom::ReadWord(), rom_, status_, and yaze::Rom::WriteColor().

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::E2ETestSuite::RunTransactionSystemTest(), and 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_, rom_, yaze::Rom::WriteByte(), yaze::Rom::WriteLong(), yaze::Rom::WriteVector(), and yaze::Rom::WriteWord().

Referenced by Commit().

Here is the call graph for this function:

Member Data Documentation

◆ rom_

Rom& yaze::Transaction::rom_
private

Definition at line 136 of file transaction.h.

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

◆ 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: