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_t & | front () noexcept
| Get first context. More...
response_context_t & | back () noexcept
| Get last context. More...
response_context_t * | get_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...
void | pop_response_context_nonchecked () noexcept
| Remove the first context from queue with the check for emptiness of the queue. More...

## Private Member Functions
std::size_t | get_real_index (request_id_t req_id) noexcept

## Private Attributes
std::vector< response_context_t > | m_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 156 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 159 of file response_coordinator.hpp.

## Member Function Documentation

## ◆ back()

response_context_t & restinio::impl::response_context_table_t::back | ( |  | ) |
| inline noexcept

Get last context.

Definition at line 187 of file response_coordinator.hpp.

## ◆ empty()

bool restinio::impl::response_context_table_t::empty | ( |  | ) | const
| inline noexcept

If table is empty.

Definition at line 166 of file response_coordinator.hpp.

## ◆ front()

response_context_t & restinio::impl::response_context_table_t::front | ( |  | ) |
| inline noexcept

Get first context.

Definition at line 180 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 | ) |
| inline noexcept

Get context of specified request.

Definition at line 196 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 | ) |
| inline private noexcept

Definition at line 264 of file response_coordinator.hpp.

## ◆ is_full()

bool restinio::impl::response_context_table_t::is_full | ( |  | ) | const
| inline noexcept

If table is full.

Definition at line 173 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 231 of file response_coordinator.hpp.

## ◆ pop_response_context_nonchecked()

void restinio::impl::response_context_table_t::pop_response_context_nonchecked | ( |  | ) |
| inline noexcept

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 252 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 210 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 272 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 274 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 273 of file response_coordinator.hpp.

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

- restinio/impl/response_coordinator.hpp