Flip Reference

Transaction Class Reference

Declared in

flip/Transaction.h

class Transaction;

flip::Transaction is a type representing a record of the modifications on a document.

Member Functions Synopsys

Constructor

Constructs the Transaction

Destructor

Destructs the Transaction

clear

Empty the transaction

empty

Returns true iff the transaction contains at least one instruction

serialize

Generate data from the transaction

push

Concatenate a transaction to this transaction

Member Functions

Constructor

Transaction ();                                    (1)
Transaction (const Transaction & rhs);             (2)
Transaction (Transaction && rhs);                  (3)
Transaction (const std::vector <uint8_t> & data);  (4)
  1. Default constructor, constructs an empty transaction.
  2. Copy constructor. Constructs the transaction with copy of other.
  3. Move constructor. Constructs the transaction by moving other.
  4. Constructor. Constructs the transaction from data previously produce by serialize.

Destructor

~Transaction ();

Destructor.


clear

void  clear ();

Empty the transaction and its metadata.


empty

bool  empty () const;

Returns true iff the transaction contains at least one instruction.


serialize

std::vector <uint8_t>   serialize () const;

Generate data from the transaction. This data can be stored everywhere or send over a network. The data contains the transaction instructions as well as metadata.


push

Transaction &  push (Transaction && tx);

Concatenate transaction tx to this transaction by moving tx.