6 #ifndef IROHA_SIGNABLE_HPP 7 #define IROHA_SIGNABLE_HPP 11 #include <boost/functional/hash.hpp> 13 #include <unordered_set> 29 template <
typename Model,
42 virtual bool addSignature(types::SignedHexStringView signed_blob,
43 types::PublicKeyHexStringView public_key) = 0;
70 rhs.signatures().begin(),
71 rhs.signatures().end());
80 return this->
hash() == rhs.hash();
111 template <
typename T>
113 return std::hash<std::string>{}(sig.publicKey());
122 template <
typename T>
124 return lhs.publicKey() == rhs.publicKey();
128 template <
typename T>
130 std::unordered_set<T, SignatureSetTypeOps, SignatureSetTypeOps>;
134 return HashProvider::makeHash(payload);
141 #endif // IROHA_SIGNABLE_HPP std::unordered_set< T, SignatureSetTypeOps, SignatureSetTypeOps > SignatureSetType
Definition: signable.hpp:130
Definition: sha3_256.hpp:15
PrettyStringBuilder & init(const std::string &name)
Definition: string_builder.cpp:18
Definition: signable.hpp:31
std::string finalize()
Definition: string_builder.cpp:44
virtual const types::BlobType & payload() const =0
PrettyStringBuilder & append(const std::string &o)
-------— Single element undecorated append. -------— ///
Definition: string_builder.cpp:38
boost::any_range< interface::Signature, boost::forward_traversal_tag, const Signature & > SignatureRangeType
Type of signature range, which returns when signatures are invoked.
Definition: range_types.hpp:24
virtual const types::BlobType & blob() const =0
bool operator()(const T &lhs, const T &rhs) const
Definition: signable.hpp:123
virtual types::TimestampType createdTime() const =0
Definition: string_builder.hpp:18
Definition: signable.hpp:105
virtual const types::HashType & hash() const =0
virtual bool addSignature(types::SignedHexStringView signed_blob, types::PublicKeyHexStringView public_key)=0
static auto makeHash(const types::BlobType &payload)
Definition: signable.hpp:133
Definition: model_primitive.hpp:22
virtual types::SignatureRangeType signatures() const =0
std::string toString() const override
Definition: signable.hpp:87
Definition: command_executor.hpp:13
PrettyStringBuilder & appendNamed(const Name &name, const Value &value)
----—— Augmented appending functions. ----—— ///
Definition: string_builder.hpp:53
bool equalsByValue(const Model &rhs) const
Definition: signable.hpp:79
size_t operator()(const T &sig) const
Definition: signable.hpp:112
bool operator==(const Model &rhs) const override
Definition: signable.hpp:65
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:69