The interface of an amendment center.
More...
#include <AmendmentCenterInterface.hpp>
|
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.
|
|
The interface of an amendment center.
◆ getAll()
virtual std::vector< Amendment > const & data::AmendmentCenterInterface::getAll |
( |
| ) |
const |
|
nodiscardpure virtual |
◆ getAmendment()
Get an amendment.
- Parameters
-
key | The 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
-
key | The key of the amendment to check |
seq | The 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
-
yield | The coroutine context to use |
key | The key of the amendment to check |
seq | The 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
-
yield | The coroutine context to use |
keys | The keys of the amendments to check |
seq | The 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
-
key | The key of the amendment to check |
- Returns
- true if supported; false otherwise
Implemented in data::AmendmentCenter.
◆ operator[]()
Get an amendment by its key.
- Parameters
-
key | The 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: