|
Odil
A C++11 library for the DICOM standard
|
RFC 5322 Message (i.e. headers with body). More...
#include <Message.h>

Public Types | |
| typedef std::map< std::string, std::string > | Headers |
| Associative container for headers. More... | |
Public Member Functions | |
| Message (Headers const &headers=Headers(), std::string const &body="") | |
| Constructor. More... | |
| virtual | ~Message () |
| Destructor. More... | |
| Headers const & | get_headers () const |
| Return the headers. More... | |
| void | set_headers (Headers const &headers) |
| Set the headers. More... | |
| bool | has_header (std::string const &name) const |
| Test whether the given header exists. More... | |
| std::string const & | get_header (std::string const &name) const |
| Return a header value or throw an exception if the required header is missing. More... | |
| void | set_header (std::string const &name, std::string const &value) |
| Set a header value. More... | |
| std::string const & | get_body () const |
| Return the body. More... | |
| void | set_body (std::string const &body) |
| Set the body. More... | |
RFC 5322 Message (i.e. headers with body).
| typedef std::map<std::string, std::string> odil::webservices::Message::Headers |
Associative container for headers.
| odil::webservices::Message::Message | ( | Headers const & | headers = Headers(), |
| std::string const & | body = "" |
||
| ) |
Constructor.
By default, headers and body will be empty.
|
virtual |
Destructor.
| std::string const& odil::webservices::Message::get_body | ( | ) | const |
Return the body.
| std::string const& odil::webservices::Message::get_header | ( | std::string const & | name | ) | const |
Return a header value or throw an exception if the required header is missing.
According to RFC 5322 1.2.2 and RFC 5234 2.3, the name is case-insensitive.
| Headers const& odil::webservices::Message::get_headers | ( | ) | const |
Return the headers.
| bool odil::webservices::Message::has_header | ( | std::string const & | name | ) | const |
Test whether the given header exists.
According to RFC 5322 1.2.2 and RFC 5234 2.3, the name is case-insensitive.
| void odil::webservices::Message::set_body | ( | std::string const & | body | ) |
Set the body.
| void odil::webservices::Message::set_header | ( | std::string const & | name, |
| std::string const & | value | ||
| ) |
Set a header value.
| void odil::webservices::Message::set_headers | ( | Headers const & | headers | ) |
Set the headers.
1.8.13