rippled
Public Types | Public Member Functions | Static Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | 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 value_type = STObject
 
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 const &)=default
 
template<class Iter , class = std::enable_if_t<std::is_convertible_v< typename std::iterator_traits<Iter>::reference, STObject>>>
 STArray (Iter first, Iter last)
 
template<class Iter , class = std::enable_if_t<std::is_convertible_v< typename std::iterator_traits<Iter>::reference, STObject>>>
 STArray (SField const &f, Iter first, Iter last)
 
STArrayoperator= (STArray const &)=default
 
 STArray (STArray &&)
 
STArrayoperator= (STArray &&)
 
 STArray (SField const &f, int n)
 
 STArray (SerialIter &sit, SField const &f, int depth=0)
 
 STArray (int n)
 
 STArray (SField const &f)
 
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
 
std::string getFullText () const override
 
std::string getText () const override
 
Json::Value getJson (JsonOptions index) const override
 
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
 
iterator erase (iterator pos)
 
iterator erase (const_iterator pos)
 
iterator erase (iterator first, iterator last)
 
iterator erase (const_iterator first, const_iterator last)
 
SerializedTypeID getSType () const override
 
bool isEquivalent (const STBase &t) const override
 
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)
 

Private Types

using list_type = std::vector< STObject >
 

Private Member Functions

STBasecopy (std::size_t n, void *buf) const override
 
STBasemove (std::size_t n, void *buf) override
 

Static Private Member Functions

static auto & getCounter () noexcept
 

Private Attributes

list_type v_
 
SField const * fName
 

Friends

class detail::STVar
 

Detailed Description

Definition at line 28 of file STArray.h.

Member Typedef Documentation

◆ list_type

Definition at line 31 of file STArray.h.

◆ value_type

Definition at line 36 of file STArray.h.

◆ size_type

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

Definition at line 37 of file STArray.h.

◆ iterator

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

Definition at line 38 of file STArray.h.

◆ const_iterator

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

Definition at line 39 of file STArray.h.

Constructor & Destructor Documentation

◆ STArray() [1/9]

ripple::STArray::STArray ( )
default

◆ STArray() [2/9]

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

◆ STArray() [3/9]

template<class Iter , class >
ripple::STArray::STArray ( Iter  first,
Iter  last 
)
explicit

Definition at line 170 of file STArray.h.

◆ STArray() [4/9]

template<class Iter , class >
ripple::STArray::STArray ( SField const &  f,
Iter  first,
Iter  last 
)

Definition at line 175 of file STArray.h.

◆ STArray() [5/9]

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

Definition at line 27 of file STArray.cpp.

◆ STArray() [6/9]

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

Definition at line 49 of file STArray.cpp.

◆ STArray() [7/9]

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

Definition at line 54 of file STArray.cpp.

◆ STArray() [8/9]

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

Definition at line 40 of file STArray.cpp.

◆ STArray() [9/9]

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.

◆ operator[]() [1/2]

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

Definition at line 181 of file STArray.h.

◆ operator[]() [2/2]

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

Definition at line 187 of file STArray.h.

◆ back() [1/2]

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

Definition at line 193 of file STArray.h.

◆ back() [2/2]

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

◆ emplace_back()

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

Definition at line 206 of file STArray.h.

◆ push_back() [1/2]

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

Definition at line 212 of file STArray.h.

◆ push_back() [2/2]

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

Definition at line 218 of file STArray.h.

◆ begin() [1/2]

STArray::const_iterator ripple::STArray::begin ( )

Definition at line 224 of file STArray.h.

◆ end() [1/2]

STArray::const_iterator ripple::STArray::end ( )

Definition at line 230 of file STArray.h.

◆ begin() [2/2]

const_iterator ripple::STArray::begin ( ) const

◆ end() [2/2]

const_iterator ripple::STArray::end ( ) const

◆ size()

STArray::size_type ripple::STArray::size ( ) const

Definition at line 248 of file STArray.h.

◆ empty()

bool ripple::STArray::empty ( ) const

Definition at line 254 of file STArray.h.

◆ clear()

void ripple::STArray::clear ( )

Definition at line 260 of file STArray.h.

◆ reserve()

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

Definition at line 266 of file STArray.h.

◆ swap()

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

Definition at line 272 of file STArray.h.

◆ getFullText()

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

Reimplemented from ripple::STBase.

Definition at line 105 of file STArray.cpp.

◆ getText()

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

Reimplemented from ripple::STBase.

Definition at line 124 of file STArray.cpp.

◆ getJson()

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

Reimplemented from ripple::STBase.

Definition at line 143 of file STArray.cpp.

◆ add()

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

Reimplemented from ripple::STBase.

Definition at line 158 of file STArray.cpp.

◆ sort()

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

Definition at line 188 of file STArray.cpp.

◆ operator==() [1/2]

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

Definition at line 278 of file STArray.h.

◆ operator!=() [1/2]

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

Definition at line 284 of file STArray.h.

◆ erase() [1/4]

STArray::iterator ripple::STArray::erase ( iterator  pos)

Definition at line 290 of file STArray.h.

◆ erase() [2/4]

STArray::iterator ripple::STArray::erase ( const_iterator  pos)

Definition at line 296 of file STArray.h.

◆ erase() [3/4]

STArray::iterator ripple::STArray::erase ( iterator  first,
iterator  last 
)

Definition at line 302 of file STArray.h.

◆ erase() [4/4]

STArray::iterator ripple::STArray::erase ( const_iterator  first,
const_iterator  last 
)

Definition at line 308 of file STArray.h.

◆ getSType()

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

Reimplemented from ripple::STBase.

Definition at line 169 of file STArray.cpp.

◆ isEquivalent()

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

Reimplemented from ripple::STBase.

Definition at line 175 of file STArray.cpp.

◆ isDefault()

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

Reimplemented from ripple::STBase.

Definition at line 182 of file STArray.cpp.

◆ copy()

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

Reimplemented from ripple::STBase.

Definition at line 93 of file STArray.cpp.

◆ move()

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

Reimplemented from ripple::STBase.

Definition at line 99 of file STArray.cpp.

◆ 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 145 of file STBase.h.

◆ downcast() [2/2]

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

Definition at line 155 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 125 of file STBase.cpp.

◆ getFName()

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

Definition at line 132 of file STBase.cpp.

◆ addFieldID()

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

Definition at line 138 of file STBase.cpp.

◆ emplace()

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

Definition at line 165 of file STBase.h.

◆ getCounter()

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

Definition at line 128 of file CountedObject.h.

Friends And Related Function Documentation

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 166 of file STArray.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
privateinherited

Definition at line 68 of file STBase.h.