rippled
Public Member Functions | Private Attributes | List of all members
ripple::SOTemplate Class Reference

Defines the fields and their attributes within a STObject. More...

Collaboration diagram for ripple::SOTemplate:
Collaboration graph
[legend]

Public Member Functions

 SOTemplate (SOTemplate &&other)=default
 
SOTemplateoperator= (SOTemplate &&other)=default
 
 SOTemplate (std::initializer_list< SOElement > uniqueFields, std::initializer_list< SOElement > commonFields={})
 Create a template populated with all fields. More...
 
std::vector< SOElement >::const_iterator begin () const
 
std::vector< SOElement >::const_iterator cbegin () const
 
std::vector< SOElement >::const_iterator end () const
 
std::vector< SOElement >::const_iterator cend () const
 
std::size_t size () const
 The number of entries in this template. More...
 
int getIndex (SField const &) const
 Retrieve the position of a named field. More...
 
SOEStyle style (SField const &sf) const
 

Private Attributes

std::vector< SOElementelements_
 
std::vector< int > indices_
 

Detailed Description

Defines the fields and their attributes within a STObject.

Each subclass of SerializedObject will provide its own template describing the available fields and their metadata attributes.

Definition at line 82 of file SOTemplate.h.

Constructor & Destructor Documentation

◆ SOTemplate() [1/2]

ripple::SOTemplate::SOTemplate ( SOTemplate &&  other)
default

◆ SOTemplate() [2/2]

ripple::SOTemplate::SOTemplate ( std::initializer_list< SOElement uniqueFields,
std::initializer_list< SOElement commonFields = {} 
)

Create a template populated with all fields.

After creating the template fields cannot be added, modified, or removed.

Definition at line 24 of file SOTemplate.cpp.

Member Function Documentation

◆ operator=()

SOTemplate& ripple::SOTemplate::operator= ( SOTemplate &&  other)
default

◆ begin()

std::vector<SOElement>::const_iterator ripple::SOTemplate::begin ( ) const

Definition at line 101 of file SOTemplate.h.

◆ cbegin()

std::vector<SOElement>::const_iterator ripple::SOTemplate::cbegin ( ) const

Definition at line 107 of file SOTemplate.h.

◆ end()

std::vector<SOElement>::const_iterator ripple::SOTemplate::end ( ) const

Definition at line 113 of file SOTemplate.h.

◆ cend()

std::vector<SOElement>::const_iterator ripple::SOTemplate::cend ( ) const

Definition at line 119 of file SOTemplate.h.

◆ size()

std::size_t ripple::SOTemplate::size ( ) const

The number of entries in this template.

Definition at line 126 of file SOTemplate.h.

◆ getIndex()

int ripple::SOTemplate::getIndex ( SField const &  sField) const

Retrieve the position of a named field.

Definition at line 56 of file SOTemplate.cpp.

◆ style()

SOEStyle ripple::SOTemplate::style ( SField const &  sf) const

Definition at line 136 of file SOTemplate.h.

Member Data Documentation

◆ elements_

std::vector<SOElement> ripple::SOTemplate::elements_
private

Definition at line 142 of file SOTemplate.h.

◆ indices_

std::vector<int> ripple::SOTemplate::indices_
private

Definition at line 143 of file SOTemplate.h.