rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ripple::InnerObjectFormats Class Reference

Manages the list of known inner object formats. More...

#include <InnerObjectFormats.h>

Inheritance diagram for ripple::InnerObjectFormats:
Inheritance graph
[legend]
Collaboration diagram for ripple::InnerObjectFormats:
Collaboration graph
[legend]

Public Member Functions

SOTemplate const * findSOTemplateBySField (SField const &sField) const
 
int findTypeByName (std::string const &name) const
 Retrieve the type for a format specified by name.
 
Item const * findByType (int 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
 

Static Public Member Functions

static InnerObjectFormats const & getInstance ()
 

Protected Member Functions

Item const * findByName (std::string const &name) const
 Retrieve a format based on its name.
 
Item const & add (char const *name, int type, std::initializer_list< SOElement > uniqueFields, std::initializer_list< SOElement > commonFields={})
 Add a new format.
 

Private Member Functions

 InnerObjectFormats ()
 Create the object.
 

Private Attributes

std::string name_
 
std::forward_list< Item > formats_
 
boost::container::flat_map< std::string, Item const * > names_
 
boost::container::flat_map< int, Item const * > types_
 

Detailed Description

Manages the list of known inner object formats.

Definition at line 29 of file InnerObjectFormats.h.

Constructor & Destructor Documentation

◆ InnerObjectFormats()

ripple::InnerObjectFormats::InnerObjectFormats ( )
private

Create the object.

This will load the object with all the known inner object formats.

Definition at line 26 of file InnerObjectFormats.cpp.

Member Function Documentation

◆ getInstance()

InnerObjectFormats const & ripple::InnerObjectFormats::getInstance ( )
static

Definition at line 178 of file InnerObjectFormats.cpp.

◆ findSOTemplateBySField()

SOTemplate const * ripple::InnerObjectFormats::findSOTemplateBySField ( SField const &  sField) const

Definition at line 185 of file InnerObjectFormats.cpp.

◆ findTypeByName()

int ripple::KnownFormats< int , InnerObjectFormats >::findTypeByName ( std::string const &  name) const
inherited

Retrieve the type for a format specified by name.

If the format name is unknown, an exception is thrown.

Parameters
nameThe name of the type.
Returns
The type.

Definition at line 117 of file KnownFormats.h.

◆ findByType()

Item const * ripple::KnownFormats< int , InnerObjectFormats >::findByType ( int  type) const
inherited

Retrieve a format based on its type.

Definition at line 129 of file KnownFormats.h.

◆ begin()

std::forward_list< Item >::const_iterator ripple::KnownFormats< int , InnerObjectFormats >::begin ( ) const
inherited

Definition at line 139 of file KnownFormats.h.

◆ end()

Definition at line 145 of file KnownFormats.h.

◆ findByName()

Item const * ripple::KnownFormats< int , InnerObjectFormats >::findByName ( std::string const &  name) const
protectedinherited

Retrieve a format based on its name.

Definition at line 154 of file KnownFormats.h.

◆ add()

Item const & ripple::KnownFormats< int , InnerObjectFormats >::add ( char const *  name,
int  type,
std::initializer_list< SOElement uniqueFields,
std::initializer_list< SOElement commonFields = {} 
)
protectedinherited

Add a new format.

Parameters
nameThe name of this format.
typeThe type of this format.
uniqueFieldsAn std::initializer_list of unique fields
commonFieldsAn std::initializer_list of common fields
Returns
The created format.

Definition at line 172 of file KnownFormats.h.

Member Data Documentation

◆ name_

std::string ripple::KnownFormats< int , InnerObjectFormats >::name_
privateinherited

Definition at line 194 of file KnownFormats.h.

◆ formats_

std::forward_list<Item> ripple::KnownFormats< int , InnerObjectFormats >::formats_
privateinherited

Definition at line 199 of file KnownFormats.h.

◆ names_

boost::container::flat_map<std::string, Item const*> ripple::KnownFormats< int , InnerObjectFormats >::names_
privateinherited

Definition at line 201 of file KnownFormats.h.

◆ types_

boost::container::flat_map<int , Item const*> ripple::KnownFormats< int , InnerObjectFormats >::types_
privateinherited

Definition at line 202 of file KnownFormats.h.