![]() |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
#include <FixedHash.h>
Classes | |
| struct | hash |
Public Types | |
| enum | { size = N } |
| The size of the container. More... | |
| enum | ConstructFromPointerType { ConstructFromPointer } |
| A dummy flag to avoid accidental construction from pointer. More... | |
| enum | ConstructFromStringType { FromHex, FromBinary } |
| Method to convert from a string. More... | |
| enum | ConstructFromHashType { AlignLeft, AlignRight, FailIfDifferent } |
| Method to convert from a string. More... | |
| using | Arith = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< N *8, N *8, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void > > |
| The corresponding arithmetic type. More... | |
Public Member Functions | |
| FixedHash () | |
| Construct an empty hash. More... | |
| template<unsigned M> | |
| FixedHash (FixedHash< M > const &_h, ConstructFromHashType _t=AlignLeft) | |
| Construct from another hash, filling with zeroes or cropping as necessary. More... | |
| FixedHash (Arith const &_arith) | |
| Convert from the corresponding arithmetic type. More... | |
| FixedHash (unsigned _u) | |
| Convert from unsigned. More... | |
| FixedHash (bytes const &_b, ConstructFromHashType _t=FailIfDifferent) | |
| Explicitly construct, copying from a byte array. More... | |
| FixedHash (bytesConstRef _b, ConstructFromHashType _t=FailIfDifferent) | |
| Explicitly construct, copying from a byte array. More... | |
| FixedHash (byte const *_bs, ConstructFromPointerType) | |
| Explicitly construct, copying from a bytes in memory with given pointer. More... | |
| FixedHash (std::string const &_s, ConstructFromStringType _t=FromHex, ConstructFromHashType _ht=FailIfDifferent) | |
| Explicitly construct, copying from a string. More... | |
| operator Arith () const | |
| Convert to arithmetic type. More... | |
| operator bool () const | |
| bool | operator== (FixedHash const &_c) const |
| bool | operator!= (FixedHash const &_c) const |
| bool | operator< (FixedHash const &_c) const |
| bool | operator>= (FixedHash const &_c) const |
| bool | operator<= (FixedHash const &_c) const |
| bool | operator> (FixedHash const &_c) const |
| FixedHash & | operator^= (FixedHash const &_c) |
| FixedHash | operator^ (FixedHash const &_c) const |
| FixedHash & | operator|= (FixedHash const &_c) |
| FixedHash | operator| (FixedHash const &_c) const |
| FixedHash & | operator&= (FixedHash const &_c) |
| FixedHash | operator& (FixedHash const &_c) const |
| FixedHash | operator~ () const |
| FixedHash & | operator++ () |
| bool | contains (FixedHash const &_c) const |
| byte & | operator[] (unsigned _i) |
| byte | operator[] (unsigned _i) const |
| std::string | abridged () const |
| std::string | abridgedMiddle () const |
| std::string | hex () const |
| bytesRef | ref () |
| bytesConstRef | ref () const |
| byte * | data () |
| byte const * | data () const |
| auto | begin () const -> typename std::array< byte, N >::const_iterator |
| auto | end () const -> typename std::array< byte, N >::const_iterator |
| bytes | asBytes () const |
| std::array< byte, N > & | asArray () |
| std::array< byte, N > const & | asArray () const |
| template<class Engine > | |
| void | randomize (Engine &_eng) |
| Populate with random data. More... | |
| template<unsigned P, unsigned M> | |
| FixedHash & | shiftBloom (FixedHash< M > const &_h) |
| template<unsigned P, unsigned M> | |
| bool | containsBloom (FixedHash< M > const &_h) |
| template<unsigned P, unsigned M> | |
| FixedHash< M > | bloomPart () const |
| unsigned | firstBitSet () const |
| Returns the index of the first bit set to one, or size() * 8 if no bits are set. More... | |
| void | clear () |
| bool | operator== (FixedHash< 32 > const &_other) const |
| Fast equality operator for h256. More... | |
Static Public Member Functions | |
| static FixedHash | random () |
Fixed-size raw-byte array container type, with an API optimised for storing hashes. Transparently converts to/from the corresponding arithmetic type; this will assume the data contained in the hash is big-endian.
Definition at line 46 of file FixedHash.h.
| using dev::FixedHash< N >::Arith = boost::multiprecision::number<boost::multiprecision::cpp_int_backend<N * 8, N * 8, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> > |
The corresponding arithmetic type.
Definition at line 50 of file FixedHash.h.
| anonymous enum |
| enum dev::FixedHash::ConstructFromHashType |
Method to convert from a string.
| Enumerator | |
|---|---|
| AlignLeft | |
| AlignRight | |
| FailIfDifferent | |
Definition at line 62 of file FixedHash.h.
| enum dev::FixedHash::ConstructFromPointerType |
A dummy flag to avoid accidental construction from pointer.
| Enumerator | |
|---|---|
| ConstructFromPointer | |
Definition at line 56 of file FixedHash.h.
| enum dev::FixedHash::ConstructFromStringType |
Method to convert from a string.
| Enumerator | |
|---|---|
| FromHex | |
| FromBinary | |
Definition at line 59 of file FixedHash.h.
|
inline |
Construct an empty hash.
Definition at line 65 of file FixedHash.h.
|
inlineexplicit |
Construct from another hash, filling with zeroes or cropping as necessary.
Definition at line 68 of file FixedHash.h.
|
inline |
Convert from the corresponding arithmetic type.
Definition at line 71 of file FixedHash.h.
|
inlineexplicit |
Convert from unsigned.
Definition at line 74 of file FixedHash.h.
|
inlineexplicit |
Explicitly construct, copying from a byte array.
Definition at line 77 of file FixedHash.h.
|
inlineexplicit |
Explicitly construct, copying from a byte array.
Definition at line 80 of file FixedHash.h.
|
inlineexplicit |
Explicitly construct, copying from a bytes in memory with given pointer.
Definition at line 83 of file FixedHash.h.
|
inlineexplicit |
Explicitly construct, copying from a string.
Definition at line 86 of file FixedHash.h.
|
inline |
Definition at line 123 of file FixedHash.h.
|
inline |
Definition at line 126 of file FixedHash.h.
|
inline |
Definition at line 153 of file FixedHash.h.
|
inline |
Definition at line 156 of file FixedHash.h.
|
inline |
Definition at line 150 of file FixedHash.h.
|
inline |
Definition at line 144 of file FixedHash.h.
|
inline |
Definition at line 185 of file FixedHash.h.
|
inline |
Definition at line 225 of file FixedHash.h.
|
inline |
Definition at line 115 of file FixedHash.h.
|
inline |
Definition at line 180 of file FixedHash.h.
|
inline |
Definition at line 138 of file FixedHash.h.
|
inline |
Definition at line 141 of file FixedHash.h.
|
inline |
Definition at line 147 of file FixedHash.h.
|
inline |
Returns the index of the first bit set to one, or size() * 8 if no bits are set.
Definition at line 208 of file FixedHash.h.
|
inline |
Definition at line 129 of file FixedHash.h.
|
inline |
Convert to arithmetic type.
Definition at line 89 of file FixedHash.h.
|
inlineexplicit |
Definition at line 92 of file FixedHash.h.
|
inline |
Definition at line 96 of file FixedHash.h.
|
inline |
Definition at line 108 of file FixedHash.h.
|
inline |
Definition at line 107 of file FixedHash.h.
|
inline |
Definition at line 112 of file FixedHash.h.
|
inline |
Definition at line 97 of file FixedHash.h.
|
inline |
Definition at line 99 of file FixedHash.h.
|
inline |
Definition at line 95 of file FixedHash.h.
|
inline |
Fast equality operator for h256.
Definition at line 312 of file FixedHash.h.
|
inline |
Definition at line 100 of file FixedHash.h.
|
inline |
Definition at line 98 of file FixedHash.h.
|
inline |
Definition at line 118 of file FixedHash.h.
|
inline |
Definition at line 120 of file FixedHash.h.
|
inline |
Definition at line 104 of file FixedHash.h.
|
inline |
Definition at line 103 of file FixedHash.h.
|
inline |
Definition at line 106 of file FixedHash.h.
|
inline |
Definition at line 105 of file FixedHash.h.
|
inline |
Definition at line 109 of file FixedHash.h.
|
inlinestatic |
Definition at line 167 of file FixedHash.h.
|
inline |
Populate with random data.
Definition at line 160 of file FixedHash.h.
|
inline |
Definition at line 132 of file FixedHash.h.
|
inline |
Definition at line 135 of file FixedHash.h.
|
inline |
Definition at line 175 of file FixedHash.h.