Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
odil::webservices::Message Class Reference

RFC 5322 Message (i.e. headers with body). More...

#include <Message.h>

Inheritance diagram for odil::webservices::Message:

Public Types

typedef std::map< std::string, std::string > Headers
 Associative container for headers.

Public Member Functions

 Message (Headers const &headers={}, std::string const &body="")
 Constructor.
 Message (Message const &)=default
 Message (Message &&)=default
Messageoperator= (Message const &)=default
Messageoperator= (Message &&)=default
virtual ~Message ()=default
Headers const & get_headers () const
 Return the headers.
void set_headers (Headers const &headers)
 Set the headers.
bool has_header (std::string const &name) const
 Test whether the given header exists.
std::string const & get_header (std::string const &name) const
 Return a header value or throw an exception if the required header is missing.
void set_header (std::string const &name, std::string const &value)
 Set a header value.
std::string const & get_body () const
 Return the body.
void set_body (std::string const &body)
 Set the body.

Detailed Description

RFC 5322 Message (i.e. headers with body).

Member Typedef Documentation

◆ Headers

typedef std::map<std::string, std::string> odil::webservices::Message::Headers

Associative container for headers.

Constructor & Destructor Documentation

◆ Message() [1/3]

odil::webservices::Message::Message ( Headers const & headers = {},
std::string const & body = "" )

Constructor.

By default, headers and body will be empty.

◆ Message() [2/3]

odil::webservices::Message::Message ( Message const & )
default

◆ Message() [3/3]

odil::webservices::Message::Message ( Message && )
default

◆ ~Message()

virtual odil::webservices::Message::~Message ( )
virtualdefault

Member Function Documentation

◆ get_body()

std::string const & odil::webservices::Message::get_body ( ) const

Return the body.

◆ get_header()

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.

◆ get_headers()

Headers const & odil::webservices::Message::get_headers ( ) const

Return the headers.

◆ has_header()

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.

◆ operator=() [1/2]

Message & odil::webservices::Message::operator= ( Message && )
default

◆ operator=() [2/2]

Message & odil::webservices::Message::operator= ( Message const & )
default

◆ set_body()

void odil::webservices::Message::set_body ( std::string const & body)

Set the body.

◆ set_header()

void odil::webservices::Message::set_header ( std::string const & name,
std::string const & value )

Set a header value.

◆ set_headers()

void odil::webservices::Message::set_headers ( Headers const & headers)

Set the headers.


The documentation for this class was generated from the following file:
  • /build/reproducible-path/odil-0.13.0/src/odil/webservices/Message.h