Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
data::AmendmentCenterInterface Class Referenceabstract

The interface of an amendment center. More...

#include <AmendmentCenterInterface.hpp>

Inheritance diagram for data::AmendmentCenterInterface:

Public Member Functions

virtual bool isSupported (AmendmentKey const &key) const =0
 Check whether an amendment is supported by Clio.
 
virtual std::map< std::string, Amendment > const & getSupported () const =0
 Get all supported amendments as a map.
 
virtual std::vector< Amendment > const & getAll () const =0
 Get all known amendments.
 
virtual bool isEnabled (AmendmentKey const &key, uint32_t seq) const =0
 Check whether an amendment was/is enabled for a given sequence.
 
virtual bool isEnabled (boost::asio::yield_context yield, AmendmentKey const &key, uint32_t seq) const =0
 Check whether an amendment was/is enabled for a given sequence.
 
virtual std::vector< bool > isEnabled (boost::asio::yield_context yield, std::vector< AmendmentKey > const &keys, uint32_t seq) const =0
 Check whether an amendment was/is enabled for a given sequence.
 
virtual Amendment const & getAmendment (AmendmentKey const &key) const =0
 Get an amendment.
 
virtual Amendment const & operator[] (AmendmentKey const &key) const =0
 Get an amendment by its key.
 

Detailed Description

The interface of an amendment center.

Member Function Documentation

◆ getAll()

virtual std::vector< Amendment > const & data::AmendmentCenterInterface::getAll ( ) const
nodiscardpure virtual

Get all known amendments.

Returns
All known amendments as a vector

Implemented in data::AmendmentCenter.

◆ getAmendment()

virtual Amendment const & data::AmendmentCenterInterface::getAmendment ( AmendmentKey const & key) const
nodiscardpure virtual

Get an amendment.

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

Implemented in data::AmendmentCenter.

◆ getSupported()

virtual std::map< std::string, Amendment > const & data::AmendmentCenterInterface::getSupported ( ) const
nodiscardpure virtual

Get all supported amendments as a map.

Returns
The amendments supported by Clio

Implemented in data::AmendmentCenter.

◆ isEnabled() [1/3]

virtual bool data::AmendmentCenterInterface::isEnabled ( AmendmentKey const & key,
uint32_t seq ) const
nodiscardpure virtual

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

Implemented in data::AmendmentCenter.

◆ isEnabled() [2/3]

virtual bool data::AmendmentCenterInterface::isEnabled ( boost::asio::yield_context yield,
AmendmentKey const & key,
uint32_t seq ) const
nodiscardpure virtual

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

Implemented in data::AmendmentCenter.

◆ isEnabled() [3/3]

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

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

Implemented in data::AmendmentCenter.

◆ isSupported()

virtual bool data::AmendmentCenterInterface::isSupported ( AmendmentKey const & key) const
nodiscardpure virtual

Check whether an amendment is supported by Clio.

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

Implemented in data::AmendmentCenter.

◆ operator[]()

virtual Amendment const & data::AmendmentCenterInterface::operator[] ( AmendmentKey const & key) const
nodiscardpure virtual

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

Implemented in data::AmendmentCenter.


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