|
xrpld
|
Manages a list of known formats. More...
#include <KnownFormats.h>

Classes | |
| class | Item |
| A known format. More... | |
Public Member Functions | |
| virtual | ~KnownFormats ()=default |
| Destroy the known formats object. | |
| KnownFormats (KnownFormats const &)=delete | |
| KnownFormats & | operator= (KnownFormats const &)=delete |
| KeyType | findTypeByName (std::string const &name) const |
| Retrieve the type for a format specified by name. | |
| Item const * | findByType (KeyType type) const |
| Retrieve a format based on its type. | |
| std::forward_list< Item >::const_iterator | begin () const |
| std::forward_list< Item >::const_iterator | end () const |
Protected Member Functions | |
| Item const * | findByName (std::string const &name) const |
| Retrieve a format based on its name. | |
| Item const & | add (char const *name, KeyType type, std::vector< SOElement > uniqueFields, std::vector< SOElement > commonFields={}) |
| Add a new format. | |
Private Member Functions | |
| KnownFormats () | |
| Create the known formats object. | |
Private Attributes | |
| std::string | name_ |
| std::forward_list< Item > | formats_ {} |
| boost::container::flat_map< std::string, Item const * > | names_ {} |
| boost::container::flat_map< KeyType, Item const * > | types_ {} |
| friend | Derived |
Manages a list of known formats.
Each format has a name, an associated KeyType (typically an enumeration), and a predefined SOElement.
| KeyType | The type of key identifying the format. |
Definition at line 27 of file KnownFormats.h.
|
private |
Create the known formats object.
Derived classes will load the object with all the known formats.
Definition at line 87 of file KnownFormats.h.
|
virtualdefault |
Destroy the known formats object.
The defined formats are deleted.
|
delete |
|
delete |
|
nodiscard |
Retrieve the type for a format specified by name.
If the format name is unknown, an exception is thrown.
| name | The name of the type. |
Definition at line 111 of file KnownFormats.h.
|
nodiscard |
Retrieve a format based on its type.
Definition at line 124 of file KnownFormats.h.
|
nodiscard |
Definition at line 134 of file KnownFormats.h.
|
nodiscard |
Definition at line 140 of file KnownFormats.h.
|
nodiscardprotected |
Retrieve a format based on its name.
Definition at line 150 of file KnownFormats.h.
|
protected |
Add a new format.
| name | The name of this format. |
| type | The type of this format. |
| uniqueFields | A std::vector of unique fields |
| commonFields | A std::vector of common fields |
Definition at line 169 of file KnownFormats.h.
|
private |
Definition at line 191 of file KnownFormats.h.
|
private |
Definition at line 196 of file KnownFormats.h.
|
private |
Definition at line 198 of file KnownFormats.h.
|
private |
Definition at line 199 of file KnownFormats.h.
|
private |
Definition at line 200 of file KnownFormats.h.