#include <astxx/manager/message.h>

The main method for accessing headers in a manager::basic_message is through the [] operator. In the case where multiple headers have the same key, the message should be accessed in the same manner as an std::multimap (i.e. using the equal_range() function).
Definition at line 68 of file message.h.
Public Types | |
|
typedef std::pair< std::string, std::string > | header_pair_t |
|
typedef std::multimap < std::string, std::string > | header_t |
Public Member Functions | |
| basic_message (const header_t::iterator begin, const header_t::iterator end) | |
| Construct a message from a set of iterators. | |
| basic_message (const std::map< std::string, std::string > &headers) | |
| Construct a message from an existing std::map of headers. | |
| basic_message (const header_t &headers) | |
| Construct a message from an existing std::multimap of headers. | |
| basic_message (const std::string &value) | |
| Construct a message initilizing the value of the main header. | |
| header_t::iterator | begin () |
| Get an iterator to the first header. | |
| header_t::iterator | end () |
| Get an iterator to one past the last header. | |
| std::pair< header_t::iterator, header_t::iterator > | equal_range (const std::string &key) |
| Get a pair of iterators pointing to the beginning and one past the end of a group of headers matching the given key. | |
| std::string | format () |
| Format this message as a string. | |
| void | insert (header_t::iterator begin, header_t::iterator end) |
| Insert key value pairs into the message. | |
| header_t::iterator | insert (const header_pair_t &pair) |
| Add a key value pair to the header. | |
| std::string | main_header () const |
| Get the value of the main header for this message. | |
| bool | operator!= (const std::string &s) const |
| Compare the main header for this message to a string. | |
| bool | operator== (const std::string &s) const |
| Compare the main header for this message to a string. | |
| std::string & | operator[] (const std::string &key) |
| Get the header that matches the given key. | |
Public Attributes | |
| std::string | data |
| Addition data from the 'Command' action. | |
| message_traits | traits |
| astxx::manager::message::basic_message< message_traits >::basic_message | ( | const std::string & | value | ) | [inline] |
Construct a message initilizing the value of the main header.
| value | the initial value of the main header |
Definition at line 85 of file message.h.
References astxx::manager::message::basic_message< message_traits >::operator[]().
| astxx::manager::message::basic_message< message_traits >::basic_message | ( | const header_t & | headers | ) | [inline, explicit] |
| astxx::manager::message::basic_message< message_traits >::basic_message | ( | const std::map< std::string, std::string > & | headers | ) | [inline, explicit] |
| astxx::manager::message::basic_message< message_traits >::basic_message | ( | const header_t::iterator | begin, | |
| const header_t::iterator | end | |||
| ) | [inline, explicit] |
| header_t::iterator astxx::manager::message::basic_message< message_traits >::begin | ( | ) | [inline] |
| header_t::iterator astxx::manager::message::basic_message< message_traits >::end | ( | ) | [inline] |
| std::pair<header_t::iterator, header_t::iterator> astxx::manager::message::basic_message< message_traits >::equal_range | ( | const std::string & | key | ) | [inline] |
| std::string astxx::manager::message::basic_message< message_traits >::format | ( | ) | [inline] |
Format this message as a string.
| manager::message::header_missing | if the main header is missing |
Definition at line 187 of file message.h.
References astxx::manager::message::basic_message< message_traits >::operator[]().
Referenced by astxx::manager::connection::send_action_async().
| void astxx::manager::message::basic_message< message_traits >::insert | ( | header_t::iterator | begin, | |
| header_t::iterator | end | |||
| ) | [inline] |
| header_t::iterator astxx::manager::message::basic_message< message_traits >::insert | ( | const header_pair_t & | pair | ) | [inline] |
Add a key value pair to the header.
| pair | the pair |
Definition at line 147 of file message.h.
Referenced by astxx::manager::action::user_event::action(), and astxx::manager::action::originate::action().
| std::string astxx::manager::message::basic_message< message_traits >::main_header | ( | ) | const [inline] |
Get the value of the main header for this message.
| manager::message::header_missing | if the main header is missing |
Definition at line 217 of file message.h.
Referenced by astxx::manager::message::basic_message< message_traits >::operator==(), and astxx::manager::connection::process_events().
| bool astxx::manager::message::basic_message< message_traits >::operator!= | ( | const std::string & | s | ) | const [inline] |
Compare the main header for this message to a string.
| s | the string |
| manager::message::header_missing | if the main header is missing |
| bool astxx::manager::message::basic_message< message_traits >::operator== | ( | const std::string & | s | ) | const [inline] |
Compare the main header for this message to a string.
| s | the string |
| manager::message::header_missing | if the main header is missing |
Definition at line 129 of file message.h.
References astxx::manager::message::basic_message< message_traits >::main_header().
| std::string& astxx::manager::message::basic_message< message_traits >::operator[] | ( | const std::string & | key | ) | [inline] |
Get the header that matches the given key.
| key | the key to use for lookup |
Definition at line 115 of file message.h.
Referenced by astxx::manager::message::basic_message< message_traits >::basic_message(), and astxx::manager::message::basic_message< message_traits >::format().
1.5.6