Orderbook Simulation
OrderbookSim is a C++ application simulating a financial market order book. It efficiently manages and matches buy and sell orders while calculating the Volume-Weighted Average Price (VWAP).
Public Types | Public Member Functions | List of all members
detail::json_reverse_iterator< Base > Class Template Reference

a template for a reverse iterator class More...

#include <json.hpp>

Inheritance diagram for detail::json_reverse_iterator< Base >:

Public Types

using difference_type = std::ptrdiff_t
 
using base_iterator = std::reverse_iterator< Base >
 shortcut to the reverse iterator adapter More...
 
using reference = typename Base::reference
 the reference type for the pointed-to element More...
 

Public Member Functions

 json_reverse_iterator (const typename base_iterator::iterator_type &it) noexcept
 create reverse iterator from iterator More...
 
 json_reverse_iterator (const base_iterator &it) noexcept
 create reverse iterator from base class More...
 
json_reverse_iterator operator++ (int) &
 post-increment (it++) More...
 
json_reverse_iteratoroperator++ ()
 pre-increment (++it) More...
 
json_reverse_iterator operator-- (int) &
 post-decrement (it–) More...
 
json_reverse_iteratoroperator-- ()
 pre-decrement (–it) More...
 
json_reverse_iteratoroperator+= (difference_type i)
 add to iterator More...
 
json_reverse_iterator operator+ (difference_type i) const
 add to iterator More...
 
json_reverse_iterator operator- (difference_type i) const
 subtract from iterator More...
 
difference_type operator- (const json_reverse_iterator &other) const
 return difference More...
 
reference operator[] (difference_type n) const
 access to successor More...
 
auto key () const -> decltype(std::declval< Base >().key())
 return the key of an object iterator More...
 
reference value () const
 return the value of an iterator More...
 

Detailed Description

template<typename Base>
class detail::json_reverse_iterator< Base >

a template for a reverse iterator class

Template Parameters
Basethe base iterator type to reverse. Valid types are iterator (to create reverse_iterator) and const_iterator (to create const_reverse_iterator).

@requirement The class satisfies the following concept requirements:

Since
version 1.0.0

Member Typedef Documentation

◆ base_iterator

template<typename Base >
using detail::json_reverse_iterator< Base >::base_iterator = std::reverse_iterator<Base>

shortcut to the reverse iterator adapter

◆ difference_type

template<typename Base >
using detail::json_reverse_iterator< Base >::difference_type = std::ptrdiff_t

◆ reference

template<typename Base >
using detail::json_reverse_iterator< Base >::reference = typename Base::reference

the reference type for the pointed-to element

Constructor & Destructor Documentation

◆ json_reverse_iterator() [1/2]

template<typename Base >
detail::json_reverse_iterator< Base >::json_reverse_iterator ( const typename base_iterator::iterator_type &  it)
inlineexplicitnoexcept

create reverse iterator from iterator

◆ json_reverse_iterator() [2/2]

template<typename Base >
detail::json_reverse_iterator< Base >::json_reverse_iterator ( const base_iterator it)
inlineexplicitnoexcept

create reverse iterator from base class

Member Function Documentation

◆ key()

template<typename Base >
auto detail::json_reverse_iterator< Base >::key ( ) const -> decltype(std::declval<Base>().key())
inline

return the key of an object iterator

◆ operator+()

template<typename Base >
json_reverse_iterator detail::json_reverse_iterator< Base >::operator+ ( difference_type  i) const
inline

add to iterator

◆ operator++() [1/2]

template<typename Base >
json_reverse_iterator& detail::json_reverse_iterator< Base >::operator++ ( )
inline

pre-increment (++it)

◆ operator++() [2/2]

template<typename Base >
json_reverse_iterator detail::json_reverse_iterator< Base >::operator++ ( int  ) &
inline

post-increment (it++)

◆ operator+=()

template<typename Base >
json_reverse_iterator& detail::json_reverse_iterator< Base >::operator+= ( difference_type  i)
inline

add to iterator

◆ operator-() [1/2]

template<typename Base >
difference_type detail::json_reverse_iterator< Base >::operator- ( const json_reverse_iterator< Base > &  other) const
inline

return difference

◆ operator-() [2/2]

template<typename Base >
json_reverse_iterator detail::json_reverse_iterator< Base >::operator- ( difference_type  i) const
inline

subtract from iterator

◆ operator--() [1/2]

template<typename Base >
json_reverse_iterator& detail::json_reverse_iterator< Base >::operator-- ( )
inline

pre-decrement (–it)

◆ operator--() [2/2]

template<typename Base >
json_reverse_iterator detail::json_reverse_iterator< Base >::operator-- ( int  ) &
inline

post-decrement (it–)

◆ operator[]()

template<typename Base >
reference detail::json_reverse_iterator< Base >::operator[] ( difference_type  n) const
inline

access to successor

◆ value()

template<typename Base >
reference detail::json_reverse_iterator< Base >::value ( ) const
inline

return the value of an iterator


The documentation for this class was generated from the following file: