Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
data::AmendmentCenter Class Reference

Knowledge center for amendments within XRPL. More...

#include <AmendmentCenter.hpp>

Inheritance diagram for data::AmendmentCenter:
Collaboration diagram for data::AmendmentCenter:

Public Member Functions

 AmendmentCenter (std::shared_ptr< data::BackendInterface > const &backend)
 Construct a new AmendmentCenter instance.
 
bool isSupported (AmendmentKey const &key) const final
 Check whether an amendment is supported by Clio.
 
std::map< std::string, Amendment > const & getSupported () const final
 Get all supported amendments as a map.
 
std::vector< Amendment > const & getAll () const final
 Get all known amendments.
 
bool isEnabled (AmendmentKey const &key, uint32_t seq) const final
 Check whether an amendment was/is enabled for a given sequence.
 
bool isEnabled (boost::asio::yield_context yield, AmendmentKey const &key, uint32_t seq) const final
 Check whether an amendment was/is enabled for a given sequence.
 
std::vector< bool > isEnabled (boost::asio::yield_context yield, std::vector< AmendmentKey > const &keys, uint32_t seq) const final
 Check whether an amendment was/is enabled for a given sequence.
 
Amendment const & getAmendment (AmendmentKey const &key) const final
 Get an amendment.
 
Amendment const & operator[] (AmendmentKey const &key) const final
 Get an amendment by its key.
 
- Public Member Functions inherited from data::AmendmentCenterInterface

Detailed Description

Knowledge center for amendments within XRPL.

Constructor & Destructor Documentation

◆ AmendmentCenter()

data::AmendmentCenter::AmendmentCenter ( std::shared_ptr< data::BackendInterface > const & backend)
explicit

Construct a new AmendmentCenter instance.

Parameters
backendThe backend

Member Function Documentation

◆ getAll()

std::vector< Amendment > const & data::AmendmentCenter::getAll ( ) const
nodiscardfinalvirtual

Get all known amendments.

Returns
All known amendments as a vector

Implements data::AmendmentCenterInterface.

◆ getAmendment()

Amendment const & data::AmendmentCenter::getAmendment ( AmendmentKey const & key) const
nodiscardfinalvirtual

Get an amendment.

Parameters
keyThe key of the amendment to get
Returns
The amendment as a const ref; asserts if the amendment is unknown

Implements data::AmendmentCenterInterface.

◆ getSupported()

std::map< std::string, Amendment > const & data::AmendmentCenter::getSupported ( ) const
nodiscardfinalvirtual

Get all supported amendments as a map.

Returns
The amendments supported by Clio

Implements data::AmendmentCenterInterface.

◆ isEnabled() [1/3]

bool data::AmendmentCenter::isEnabled ( AmendmentKey const & key,
uint32_t seq ) const
nodiscardfinalvirtual

Check whether an amendment was/is enabled for a given sequence.

Parameters
keyThe key of the amendment to check
seqThe sequence to check for
Returns
true if enabled; false otherwise

Implements data::AmendmentCenterInterface.

◆ isEnabled() [2/3]

bool data::AmendmentCenter::isEnabled ( boost::asio::yield_context yield,
AmendmentKey const & key,
uint32_t seq ) const
nodiscardfinalvirtual

Check whether an amendment was/is enabled for a given sequence.

Parameters
yieldThe coroutine context to use
keyThe key of the amendment to check
seqThe sequence to check for
Returns
true if enabled; false otherwise

Implements data::AmendmentCenterInterface.

◆ isEnabled() [3/3]

std::vector< bool > data::AmendmentCenter::isEnabled ( boost::asio::yield_context yield,
std::vector< AmendmentKey > const & keys,
uint32_t seq ) const
nodiscardfinalvirtual

Check whether an amendment was/is enabled for a given sequence.

Parameters
yieldThe coroutine context to use
keysThe keys of the amendments to check
seqThe sequence to check for
Returns
A vector of bools representing enabled state for each of the given keys

Implements data::AmendmentCenterInterface.

◆ isSupported()

bool data::AmendmentCenter::isSupported ( AmendmentKey const & key) const
nodiscardfinalvirtual

Check whether an amendment is supported by Clio.

Parameters
keyThe key of the amendment to check
Returns
true if supported; false otherwise

Implements data::AmendmentCenterInterface.

◆ operator[]()

Amendment const & data::AmendmentCenter::operator[] ( AmendmentKey const & key) const
nodiscardfinalvirtual

Get an amendment by its key.

Parameters
keyThe amendment key from
See also
Amendments
Returns
The amendment as a const ref; asserts if the amendment is unknown

Implements data::AmendmentCenterInterface.


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