RESTinio
Public Member Functions | Private Member Functions | Private Attributes | List of all members
restinio::impl::response_context_table_t Class Reference

Helper storage for responses' contexts. More...

#include <response_coordinator.hpp>

Public Member Functions

 response_context_table_t (std::size_t max_elements_count)
 
bool empty () const noexcept
 If table is empty. More...
 
bool is_full () const noexcept
 If table is full. More...
 
response_context_tfront () noexcept
 Get first context. More...
 
response_context_tback () noexcept
 Get last context. More...
 
response_context_tget_by_req_id (request_id_t req_id) noexcept
 Get context of specified request. More...
 
void push_response_context (request_id_t req_id)
 Insert new context into queue. More...
 
void pop_response_context ()
 Remove the first context from queue. More...
 

Private Member Functions

std::size_t get_real_index (request_id_t req_id) noexcept
 

Private Attributes

std::vector< response_context_tm_contexts
 
std::size_t m_first_element_index {0}
 
std::size_t m_elements_exists {0}
 

Detailed Description

Helper storage for responses' contexts.

Definition at line 137 of file response_coordinator.hpp.

Constructor & Destructor Documentation

◆ response_context_table_t()

restinio::impl::response_context_table_t::response_context_table_t ( std::size_t  max_elements_count)
inline

Definition at line 140 of file response_coordinator.hpp.

Member Function Documentation

◆ back()

response_context_t& restinio::impl::response_context_table_t::back ( )
inlinenoexcept

Get last context.

Definition at line 168 of file response_coordinator.hpp.

◆ empty()

bool restinio::impl::response_context_table_t::empty ( ) const
inlinenoexcept

If table is empty.

Definition at line 147 of file response_coordinator.hpp.

◆ front()

response_context_t& restinio::impl::response_context_table_t::front ( )
inlinenoexcept

Get first context.

Definition at line 161 of file response_coordinator.hpp.

◆ get_by_req_id()

response_context_t* restinio::impl::response_context_table_t::get_by_req_id ( request_id_t  req_id)
inlinenoexcept

Get context of specified request.

Definition at line 177 of file response_coordinator.hpp.

◆ get_real_index()

std::size_t restinio::impl::response_context_table_t::get_real_index ( request_id_t  req_id)
inlineprivatenoexcept

Definition at line 229 of file response_coordinator.hpp.

◆ is_full()

bool restinio::impl::response_context_table_t::is_full ( ) const
inlinenoexcept

If table is full.

Definition at line 154 of file response_coordinator.hpp.

◆ pop_response_context()

void restinio::impl::response_context_table_t::pop_response_context ( )
inline

Remove the first context from queue.

Definition at line 212 of file response_coordinator.hpp.

◆ push_response_context()

void restinio::impl::response_context_table_t::push_response_context ( request_id_t  req_id)
inline

Insert new context into queue.

Definition at line 191 of file response_coordinator.hpp.

Member Data Documentation

◆ m_contexts

std::vector< response_context_t > restinio::impl::response_context_table_t::m_contexts
private

Definition at line 237 of file response_coordinator.hpp.

◆ m_elements_exists

std::size_t restinio::impl::response_context_table_t::m_elements_exists {0}
private

Definition at line 239 of file response_coordinator.hpp.

◆ m_first_element_index

std::size_t restinio::impl::response_context_table_t::m_first_element_index {0}
private

Definition at line 238 of file response_coordinator.hpp.


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