hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::interface::TransactionBatchFactory Class Referenceabstract

#include "transaction_batch_factory.hpp"

Inheritance diagram for shared_model::interface::TransactionBatchFactory:
Inheritance graph
Collaboration diagram for shared_model::interface::TransactionBatchFactory:
Collaboration graph

Public Types

template<typename BatchType >
using FactoryResult = iroha::expected::Result< BatchType, std::string >
 

Public Member Functions

virtual ~TransactionBatchFactory ()=default
 
virtual FactoryResult< std::unique_ptr< TransactionBatch > > createTransactionBatch (const types::SharedTxsCollectionType &transactions) const =0
 
virtual FactoryResult< std::unique_ptr< TransactionBatch > > createTransactionBatch (std::shared_ptr< Transaction > transaction) const =0
 

Detailed Description

Provides methods that create transaction batch from a single transaction, or a collection of transactions. Field validator is used by default

Member Typedef Documentation

template<typename BatchType >
using shared_model::interface::TransactionBatchFactory::FactoryResult = iroha::expected::Result<BatchType, std::string>

Constructor & Destructor Documentation

virtual shared_model::interface::TransactionBatchFactory::~TransactionBatchFactory ( )
virtualdefault

Member Function Documentation

virtual FactoryResult<std::unique_ptr<TransactionBatch> > shared_model::interface::TransactionBatchFactory::createTransactionBatch ( const types::SharedTxsCollectionType transactions) const
pure virtual

Create transaction batch out of collection of transactions

Parameters
transactionscollection of transactions, should be from the same batch
Returns
valid batch of transactions or string error

Implemented in shared_model::interface::TransactionBatchFactoryImpl.

virtual FactoryResult<std::unique_ptr<TransactionBatch> > shared_model::interface::TransactionBatchFactory::createTransactionBatch ( std::shared_ptr< Transaction transaction) const
pure virtual

Creates transaction batch from single transaction

Parameters
transactionis transaction being validated and used to create batch
Returns
batch with single transaction or string error
Note
transactions in such batches may not have batch meta information

Implemented in shared_model::interface::TransactionBatchFactoryImpl.


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