hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::interface::Signable< Model, HashProvider > Class Template Referenceabstract

#include "signable.hpp"

Inheritance diagram for shared_model::interface::Signable< Model, HashProvider >:
Inheritance graph
Collaboration diagram for shared_model::interface::Signable< Model, HashProvider >:
Collaboration graph

Classes

class  SignatureSetTypeOps
 

Public Member Functions

virtual types::SignatureRangeType signatures () const =0
 
virtual bool addSignature (const crypto::Signed &signed_blob, const crypto::PublicKey &public_key)=0
 
virtual types::TimestampType createdTime () const =0
 
virtual const types::BlobTypepayload () const =0
 
virtual const types::BlobTypeblob () const =0
 
bool operator== (const Model &rhs) const override
 
bool equalsByValue (const Model &rhs) const
 
virtual const types::HashTypehash () const
 
std::string toString () const override
 
- Public Member Functions inherited from shared_model::interface::ModelPrimitive< Model >
virtual bool operator!= (const ModelType &rhs) const
 
virtual ~ModelPrimitive ()=default
 
- Public Member Functions inherited from Cloneable< ModelPrimitive< Model > >
virtual ~Cloneable ()=default
 

Protected Types

template<typename T >
using SignatureSetType = std::unordered_set< T, SignatureSetTypeOps, SignatureSetTypeOps >
 

Additional Inherited Members

- Public Types inherited from shared_model::interface::ModelPrimitive< Model >
using ModelType = Model
 
- Public Types inherited from Cloneable< ModelPrimitive< Model > >
using base_type = ModelPrimitive< Model >
 
- Protected Member Functions inherited from Cloneable< ModelPrimitive< Model > >
virtual ModelPrimitive< Model > * clone () const =0
 

Detailed Description

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
class shared_model::interface::Signable< Model, HashProvider >

Interface provides signatures and adds them to model object

Template Parameters
Model- your model

Member Typedef Documentation

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
template<typename T >
using shared_model::interface::Signable< Model, HashProvider >::SignatureSetType = std::unordered_set<T, SignatureSetTypeOps, SignatureSetTypeOps>
protected

Member Function Documentation

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
virtual bool shared_model::interface::Signable< Model, HashProvider >::addSignature ( const crypto::Signed signed_blob,
const crypto::PublicKey public_key 
)
pure virtual

Attach signature to object

Parameters
signature- signature object for insertion
Returns
true, if signature was added

Implemented in shared_model::proto::FINAL, shared_model::proto::FINAL, shared_model::proto::FINAL, and shared_model::proto::Block.

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
virtual const types::BlobType& shared_model::interface::Signable< Model, HashProvider >::blob ( ) const
pure virtual
Returns
blob representation of object include signatures

Implemented in shared_model::proto::FINAL, shared_model::proto::FINAL, shared_model::proto::Block, and shared_model::proto::FINAL.

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
virtual types::TimestampType shared_model::interface::Signable< Model, HashProvider >::createdTime ( ) const
pure virtual
Returns
time of creation

Implemented in shared_model::proto::FINAL, shared_model::proto::FINAL, shared_model::proto::FINAL, shared_model::proto::Block, and shared_model::proto::FINAL.

Here is the caller graph for this function:

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
bool shared_model::interface::Signable< Model, HashProvider >::equalsByValue ( const Model &  rhs) const
inline

Provides comaprison based on equality objects only

Parameters
rhs- another model object
Returns
true, if hashes of objects are equal
template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
virtual const types::HashType& shared_model::interface::Signable< Model, HashProvider >::hash ( ) const
inlinevirtual

Here is the caller graph for this function:

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
bool shared_model::interface::Signable< Model, HashProvider >::operator== ( const Model &  rhs) const
inlineoverridevirtual

Provides comparison based on equality of objects and signatures.

Parameters
rhs- another model object
Returns
true, if objects totally equal

Implements shared_model::interface::ModelPrimitive< Model >.

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
virtual const types::BlobType& shared_model::interface::Signable< Model, HashProvider >::payload ( ) const
pure virtual
Returns
object payload (everything except signatures)

Implemented in shared_model::proto::Block, shared_model::proto::FINAL, shared_model::proto::FINAL, and shared_model::proto::FINAL.

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
virtual types::SignatureRangeType shared_model::interface::Signable< Model, HashProvider >::signatures ( ) const
pure virtual
Returns
attached signatures

Implemented in shared_model::proto::FINAL, shared_model::proto::FINAL, shared_model::proto::FINAL, and shared_model::proto::Block.

Here is the caller graph for this function:

template<typename Model, typename HashProvider = shared_model::crypto::Sha3_256>
std::string shared_model::interface::Signable< Model, HashProvider >::toString ( ) const
inlineoverridevirtual

Make string developer representation of object

Returns
string with internal state of object

Reimplemented from shared_model::interface::ModelPrimitive< Model >.

Here is the caller graph for this function:


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