20 #include <ripple/protocol/Feature.h>
21 #include <ripple/protocol/Rules.h>
44 set_.reserve(amendments.size());
45 set_.insert(amendments.begin(), amendments.end());
59 return set_.count(feature) > 0;
75 : impl_(
std::make_shared<
Impl>(presets))
90 return impl_->presets();
109 return impl_->enabled(feature);
124 return !(*
this == other);
const uint256 fixNFTokenNegOffer
std::unordered_set< uint256, beast::uhash<> > const & presets() const
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
std::shared_ptr< Impl const > impl_
Impl(std::unordered_set< uint256, beast::uhash<>> const &presets)
std::unordered_set< uint256, beast::uhash<> > const & presets_
Impl(std::unordered_set< uint256, beast::uhash<>> const &presets, std::optional< uint256 > const &digest, STVector256 const &amendments)
bool operator!=(Rules const &other) const
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
const uint256 fixNFTokenDirV1
bool operator==(Rules const &) const
Returns true if two rule sets are identical.
std::unordered_set< uint256, beast::uhash<> > const & presets() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const uint256 featureNonFungibleTokensV1
bool enabled(uint256 const &feature) const
std::unordered_set< uint256, hardened_hash<> > set_
const uint256 featureNonFungibleTokensV1_1
Rules controlling protocol behavior.
std::optional< uint256 > digest_
bool operator==(Impl const &other) const