RESTinio
Loading...
Searching...
No Matches
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.
 
bool is_full () const noexcept
 If table is full.
 
response_context_tfront () noexcept
 Get first context.
 
response_context_tback () noexcept
 Get last context.
 
response_context_tget_by_req_id (request_id_t req_id) noexcept
 Get context of specified request.
 
void push_response_context (request_id_t req_id)
 Insert new context into queue.
 
void pop_response_context ()
 Remove the first context from queue.
 
void pop_response_context_nonchecked () noexcept
 Remove the first context from queue with the check for emptiness of the queue.
 

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 158 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 161 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 189 of file response_coordinator.hpp.

◆ empty()

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

If table is empty.

Definition at line 168 of file response_coordinator.hpp.

◆ front()

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

Get first context.

Definition at line 182 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 198 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 266 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 175 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 233 of file response_coordinator.hpp.

◆ pop_response_context_nonchecked()

void restinio::impl::response_context_table_t::pop_response_context_nonchecked ( )
inlinenoexcept

Remove the first context from queue with the check for emptiness of the queue.

Note
This method is noexcept and indended to be used in noexcept context. But the emptiness of the queue should be checked before the call of this method.
Since
v.0.6.0

Definition at line 254 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 212 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 274 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 276 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 275 of file response_coordinator.hpp.


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