rippled
Public Types | Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Static Private Member Functions | Private Attributes | List of all members
ripple::STArray Class Referencefinal
Inheritance diagram for ripple::STArray:
Inheritance graph
[legend]
Collaboration diagram for ripple::STArray:
Collaboration graph
[legend]

Public Types

using size_type = list_type::size_type
 
using iterator = list_type::iterator
 
using const_iterator = list_type::const_iterator
 

Public Member Functions

 STArray ()=default
 
 STArray (STArray &&)
 
 STArray (STArray const &)=default
 
 STArray (SField const &f, int n)
 
 STArray (SerialIter &sit, SField const &f, int depth=0)
 
 STArray (int n)
 
 STArray (SField const &f)
 
STArrayoperator= (STArray const &)=default
 
STArrayoperator= (STArray &&)
 
STBasecopy (std::size_t n, void *buf) const override
 
STBasemove (std::size_t n, void *buf) override
 
STObjectoperator[] (std::size_t j)
 
STObject const & operator[] (std::size_t j) const
 
STObjectback ()
 
STObject const & back () const
 
template<class... Args>
void emplace_back (Args &&... args)
 
void push_back (STObject const &object)
 
void push_back (STObject &&object)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
size_type size () const
 
bool empty () const
 
void clear ()
 
void reserve (std::size_t n)
 
void swap (STArray &a) noexcept
 
virtual std::string getFullText () const override
 
virtual std::string getText () const override
 
virtual Json::Value getJson (JsonOptions index) const override
 
virtual void add (Serializer &s) const override
 
void sort (bool(*compare)(const STObject &o1, const STObject &o2))
 
bool operator== (const STArray &s) const
 
bool operator!= (const STArray &s) const
 
virtual SerializedTypeID getSType () const override
 
virtual bool isEquivalent (const STBase &t) const override
 
virtual bool isDefault () const override
 
bool operator== (const STBase &t) const
 
bool operator!= (const STBase &t) const
 
template<class D >
D & downcast ()
 
template<class D >
D const & downcast () const
 
void setFName (SField const &n)
 A STBase is a field. More...
 
SField const & getFName () const
 
void addFieldID (Serializer &s) const
 

Static Protected Member Functions

template<class T >
static STBaseemplace (std::size_t n, void *buf, T &&val)
 

Protected Attributes

SField const * fName
 

Private Types

using list_type = std::vector< STObject >
 

Static Private Member Functions

static auto & getCounter () noexcept
 

Private Attributes

list_type v_
 

Detailed Description

Definition at line 28 of file STArray.h.

Member Typedef Documentation

◆ list_type

Definition at line 31 of file STArray.h.

◆ size_type

using ripple::STArray::size_type = list_type::size_type

Definition at line 36 of file STArray.h.

◆ iterator

using ripple::STArray::iterator = list_type::iterator

Definition at line 37 of file STArray.h.

◆ const_iterator

using ripple::STArray::const_iterator = list_type::const_iterator

Definition at line 38 of file STArray.h.

Constructor & Destructor Documentation

◆ STArray() [1/7]

ripple::STArray::STArray ( )
default

◆ STArray() [2/7]

ripple::STArray::STArray ( STArray &&  other)

Definition at line 27 of file STArray.cpp.

◆ STArray() [3/7]

ripple::STArray::STArray ( STArray const &  )
default

◆ STArray() [4/7]

ripple::STArray::STArray ( SField const &  f,
int  n 
)

Definition at line 49 of file STArray.cpp.

◆ STArray() [5/7]

ripple::STArray::STArray ( SerialIter sit,
SField const &  f,
int  depth = 0 
)

Definition at line 54 of file STArray.cpp.

◆ STArray() [6/7]

ripple::STArray::STArray ( int  n)
explicit

Definition at line 40 of file STArray.cpp.

◆ STArray() [7/7]

ripple::STArray::STArray ( SField const &  f)
explicit

Definition at line 45 of file STArray.cpp.

Member Function Documentation

◆ operator=() [1/2]

STArray& ripple::STArray::operator= ( STArray const &  )
default

◆ operator=() [2/2]

STArray & ripple::STArray::operator= ( STArray &&  other)

Definition at line 33 of file STArray.cpp.

◆ copy()

STBase* ripple::STArray::copy ( std::size_t  n,
void *  buf 
) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 53 of file STArray.h.

◆ move()

STBase* ripple::STArray::move ( std::size_t  n,
void *  buf 
)
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 59 of file STArray.h.

◆ operator[]() [1/2]

STObject& ripple::STArray::operator[] ( std::size_t  j)

Definition at line 65 of file STArray.h.

◆ operator[]() [2/2]

STObject const& ripple::STArray::operator[] ( std::size_t  j) const

Definition at line 71 of file STArray.h.

◆ back() [1/2]

STObject& ripple::STArray::back ( )

Definition at line 77 of file STArray.h.

◆ back() [2/2]

STObject const& ripple::STArray::back ( ) const

Definition at line 83 of file STArray.h.

◆ emplace_back()

template<class... Args>
void ripple::STArray::emplace_back ( Args &&...  args)

Definition at line 90 of file STArray.h.

◆ push_back() [1/2]

void ripple::STArray::push_back ( STObject const &  object)

Definition at line 96 of file STArray.h.

◆ push_back() [2/2]

void ripple::STArray::push_back ( STObject &&  object)

Definition at line 102 of file STArray.h.

◆ begin() [1/2]

iterator ripple::STArray::begin ( )

Definition at line 108 of file STArray.h.

◆ end() [1/2]

iterator ripple::STArray::end ( )

Definition at line 114 of file STArray.h.

◆ begin() [2/2]

const_iterator ripple::STArray::begin ( ) const

Definition at line 120 of file STArray.h.

◆ end() [2/2]

const_iterator ripple::STArray::end ( ) const

Definition at line 126 of file STArray.h.

◆ size()

size_type ripple::STArray::size ( ) const

Definition at line 132 of file STArray.h.

◆ empty()

bool ripple::STArray::empty ( ) const

Definition at line 138 of file STArray.h.

◆ clear()

void ripple::STArray::clear ( )

Definition at line 143 of file STArray.h.

◆ reserve()

void ripple::STArray::reserve ( std::size_t  n)

Definition at line 148 of file STArray.h.

◆ swap()

void ripple::STArray::swap ( STArray a)
noexcept

Definition at line 153 of file STArray.h.

◆ getFullText()

std::string ripple::STArray::getFullText ( ) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 93 of file STArray.cpp.

◆ getText()

std::string ripple::STArray::getText ( ) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 112 of file STArray.cpp.

◆ getJson()

Json::Value ripple::STArray::getJson ( JsonOptions  index) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 131 of file STArray.cpp.

◆ add()

void ripple::STArray::add ( Serializer s) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 146 of file STArray.cpp.

◆ sort()

void ripple::STArray::sort ( bool(*)(const STObject &o1, const STObject &o2)  compare)

Definition at line 164 of file STArray.cpp.

◆ operator==() [1/2]

bool ripple::STArray::operator== ( const STArray s) const

Definition at line 172 of file STArray.h.

◆ operator!=() [1/2]

bool ripple::STArray::operator!= ( const STArray s) const

Definition at line 177 of file STArray.h.

◆ getSType()

virtual SerializedTypeID ripple::STArray::getSType ( ) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 183 of file STArray.h.

◆ isEquivalent()

bool ripple::STArray::isEquivalent ( const STBase t) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 157 of file STArray.cpp.

◆ isDefault()

virtual bool ripple::STArray::isDefault ( ) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 190 of file STArray.h.

◆ operator==() [2/2]

bool ripple::STBase::operator== ( const STBase t) const
inherited

Definition at line 45 of file STBase.cpp.

◆ operator!=() [2/2]

bool ripple::STBase::operator!= ( const STBase t) const
inherited

Definition at line 51 of file STBase.cpp.

◆ downcast() [1/2]

template<class D >
D& ripple::STBase::downcast ( )
inherited

Definition at line 94 of file STBase.h.

◆ downcast() [2/2]

template<class D >
D const& ripple::STBase::downcast ( ) const
inherited

Definition at line 104 of file STBase.h.

◆ setFName()

void ripple::STBase::setFName ( SField const &  n)
inherited

A STBase is a field.

This sets the name.

Definition at line 113 of file STBase.cpp.

◆ getFName()

SField const & ripple::STBase::getFName ( ) const
inherited

Definition at line 120 of file STBase.cpp.

◆ addFieldID()

void ripple::STBase::addFieldID ( Serializer s) const
inherited

Definition at line 126 of file STBase.cpp.

◆ emplace()

template<class T >
static STBase* ripple::STBase::emplace ( std::size_t  n,
void *  buf,
T &&  val 
)
staticprotectedinherited

Definition at line 149 of file STBase.h.

◆ getCounter()

static auto& ripple::CountedObject< STArray >::getCounter
staticprivatenoexceptinherited

Definition at line 128 of file CountedObject.h.

Member Data Documentation

◆ v_

list_type ripple::STArray::v_
private

Definition at line 33 of file STArray.h.

◆ fName

SField const* ripple::STBase::fName
protectedinherited

Definition at line 145 of file STBase.h.