restinio::base_response_builder_t< Response_Builder > Class Template Reference

`#include <message_builders.hpp>`

## Public Member Functions

| base_response_builder_t (const base_response_builder_t &)=delete
base_response_builder_t & | operator= (const base_response_builder_t &)=delete
| base_response_builder_t (base_response_builder_t &&) noexcept=default
base_response_builder_t & | operator= (base_response_builder_t &&) noexcept=default
virtual | ~base_response_builder_t ()=default
| base_response_builder_t (http_status_line_t status_line, impl::connection_handle_t connection, request_id_t request_id, bool should_keep_alive)
Response_Builder & | append_header (std::string field_name, std::string field_value) &
| Add header field. More...
Response_Builder && | append_header (std::string field_name, std::string field_value) &&
| Add header field. More...
Response_Builder & | append_header (http_header_field_t http_header_field) &
| Add header field. More...
Response_Builder && | append_header (http_header_field_t http_header_field) &&
| Add header field. More...
Response_Builder & | append_header (http_field_t field_id, std::string field_value) &
| Add header field. More...
Response_Builder && | append_header (http_field_t field_id, std::string field_value) &&
| Add header field. More...
Response_Builder & | append_header_date_field (std::chrono::system_clock::time_point tp=std::chrono::system_clock::now()) &
| Add header `Date` field. More...
Response_Builder && | append_header_date_field (std::chrono::system_clock::time_point tp=std::chrono::system_clock::now()) &&
| Add header `Date` field. More...
Response_Builder & | connection_close () &noexcept
| Set connection close. More...
Response_Builder && | connection_close () &&noexcept
| Set connection close. More...
Response_Builder & | connection_keep_alive () &noexcept
| Set connection keep-alive. More...
Response_Builder && | connection_keep_alive () &&noexcept
http_response_header_t & | header () noexcept
| Accessors for header. More...
const http_response_header_t & | header () const noexcept

## Protected Member Functions

std::size_t | calculate_status_line_size () const noexcept
void | throw_done_must_be_called_once () const

## Protected Attributes

http_response_header_t | m_header
impl::connection_handle_t | m_connection
const request_id_t | m_request_id

## Private Member Functions

Response_Builder & | upcast_reference () noexcept

## Detailed Description

template<typename Response_Builder>
class restinio::base_response_builder_t< Response_Builder >

Definition at line 59 of file message_builders.hpp.

## Constructor & Destructor Documentation

## base_response_builder_t() [1/3]

template<typename Response_Builder >

restinio::base_response_builder_t< Response_Builder >::base_response_builder_t | ( | const base_response_builder_t< Response_Builder > & |  | ) |

delete

## base_response_builder_t() [2/3]

template<typename Response_Builder >

restinio::base_response_builder_t< Response_Builder >::base_response_builder_t | ( | base_response_builder_t< Response_Builder > && |  | ) |

defaultnoexcept

## ~base_response_builder_t()

template<typename Response_Builder >

virtual restinio::base_response_builder_t< Response_Builder >::~base_response_builder_t | ( |  | ) |

virtualdefault

## base_response_builder_t() [3/3]

template<typename Response_Builder >

restinio::base_response_builder_t< Response_Builder >::base_response_builder_t | ( | http_status_line_t | status_line,
|  | impl::connection_handle_t | connection,
|  | request_id_t | request_id,
|  | bool | should_keep_alive
| ) |  |

inline

Definition at line 70 of file message_builders.hpp.

## Member Function Documentation

## append_header() [1/6]

template<typename Response_Builder >

Response_Builder & restinio::base_response_builder_t< Response_Builder >::append_header | ( | http_field_t | field_id,
|  | std::string | field_value
| ) |  | &

inline

Add header field.

Definition at line 138 of file message_builders.hpp.

## append_header() [2/6]

template<typename Response_Builder >

Response_Builder && restinio::base_response_builder_t< Response_Builder >::append_header | ( | http_field_t | field_id,
|  | std::string | field_value
| ) |  | &&

inline

Add header field.

Definition at line 150 of file message_builders.hpp.

## append_header() [3/6]

template<typename Response_Builder >

Response_Builder & restinio::base_response_builder_t< Response_Builder >::append_header | ( | http_header_field_t | http_header_field | ) | &

inline

Add header field.

Definition at line 122 of file message_builders.hpp.

## append_header() [4/6]

template<typename Response_Builder >

Response_Builder && restinio::base_response_builder_t< Response_Builder >::append_header | ( | http_header_field_t | http_header_field | ) | &&

inline

Add header field.

Definition at line 130 of file message_builders.hpp.

## append_header() [5/6]

template<typename Response_Builder >

Response_Builder & restinio::base_response_builder_t< Response_Builder >::append_header | ( | std::string | field_name,
|  | std::string | field_value
| ) |  | &

inline

Add header field.

Definition at line 99 of file message_builders.hpp.

## append_header() [6/6]

template<typename Response_Builder >

Response_Builder && restinio::base_response_builder_t< Response_Builder >::append_header | ( | std::string | field_name,
|  | std::string | field_value
| ) |  | &&

inline

Add header field.

Definition at line 111 of file message_builders.hpp.

## append_header_date_field() [1/2]

template<typename Response_Builder >

Response_Builder & restinio::base_response_builder_t< Response_Builder >::append_header_date_field | ( | std::chrono::system_clock::time_point | tp = `std::chrono::system_clock::now()` | ) | &

inline

Add header `Date` field.

Definition at line 162 of file message_builders.hpp.

## append_header_date_field() [2/2]

template<typename Response_Builder >

Response_Builder && restinio::base_response_builder_t< Response_Builder >::append_header_date_field | ( | std::chrono::system_clock::time_point | tp = `std::chrono::system_clock::now()` | ) | &&

inline

Add header `Date` field.

Definition at line 172 of file message_builders.hpp.

## calculate_status_line_size()

template<typename Response_Builder >

std::size_t restinio::base_response_builder_t< Response_Builder >::calculate_status_line_size | ( |  | ) | const

inlineprotectednoexcept

Definition at line 211 of file message_builders.hpp.

## connection_close() [1/2]

template<typename Response_Builder >

Response_Builder && restinio::base_response_builder_t< Response_Builder >::connection_close | ( |  | ) | &&

inlinenoexcept

Set connection close.

Definition at line 189 of file message_builders.hpp.

## connection_close() [2/2]

template<typename Response_Builder >

Response_Builder & restinio::base_response_builder_t< Response_Builder >::connection_close | ( |  | ) | &

inlinenoexcept

Set connection close.

Definition at line 181 of file message_builders.hpp.

## connection_keep_alive() [1/2]

template<typename Response_Builder >

Response_Builder && restinio::base_response_builder_t< Response_Builder >::connection_keep_alive | ( |  | ) | &&

inlinenoexcept

Definition at line 204 of file message_builders.hpp.

## connection_keep_alive() [2/2]

template<typename Response_Builder >

Response_Builder & restinio::base_response_builder_t< Response_Builder >::connection_keep_alive | ( |  | ) | &

inlinenoexcept

Set connection keep-alive.

Definition at line 197 of file message_builders.hpp.

## header() [1/2]

template<typename Response_Builder >

const http_response_header_t & restinio::base_response_builder_t< Response_Builder >::header | ( |  | ) | const

inlinenoexcept

Definition at line 91 of file message_builders.hpp.

## header() [2/2]

template<typename Response_Builder >

http_response_header_t & restinio::base_response_builder_t< Response_Builder >::header | ( |  | ) |

inlinenoexcept

Accessors for header.

Definition at line 85 of file message_builders.hpp.

## operator=() [1/2]

template<typename Response_Builder >

base_response_builder_t & restinio::base_response_builder_t< Response_Builder >::operator= | ( | base_response_builder_t< Response_Builder > && |  | ) |

defaultnoexcept

## operator=() [2/2]

template<typename Response_Builder >

base_response_builder_t & restinio::base_response_builder_t< Response_Builder >::operator= | ( | const base_response_builder_t< Response_Builder > & |  | ) |

delete

## throw_done_must_be_called_once()

template<typename Response_Builder >

void restinio::base_response_builder_t< Response_Builder >::throw_done_must_be_called_once | ( |  | ) | const

inlineprotected

Definition at line 223 of file message_builders.hpp.

## upcast_reference()

template<typename Response_Builder >

Response_Builder & restinio::base_response_builder_t< Response_Builder >::upcast_reference | ( |  | ) |

inlineprivatenoexcept

Definition at line 230 of file message_builders.hpp.

## Member Data Documentation

## m_connection

template<typename Response_Builder >

impl::connection_handle_t restinio::base_response_builder_t< Response_Builder >::m_connection

protected

Definition at line 219 of file message_builders.hpp.

## m_header

template<typename Response_Builder >

http_response_header_t restinio::base_response_builder_t< Response_Builder >::m_header

protected

Definition at line 217 of file message_builders.hpp.

## m_request_id

template<typename Response_Builder >

const request_id_t restinio::base_response_builder_t< Response_Builder >::m_request_id

protected

Definition at line 220 of file message_builders.hpp.

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

- restinio/message_builders.hpp