This is a container for holding multiple (unique) message formats.
More...
#include "umps/messageFormats/messages.hpp"
This is a container for holding multiple (unique) message formats.
- Copyright
- Ben Baker (University of Utah)
◆ Messages() [1/2]
UMPS::MessageFormats::Messages::Messages |
( |
const Messages & |
messages | ) |
|
Copy constructor.
- Parameters
-
[in] | messages | The messages container from which to initialize this class. |
◆ Messages() [2/2]
UMPS::MessageFormats::Messages::Messages |
( |
Messages && |
messages | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
[in,out] | messages | The messages container from which to initialize this class. On exit, messages's behavior is undefined. |
◆ add()
void UMPS::MessageFormats::Messages::add |
( |
const std::unique_ptr< IMessage > & |
message | ) |
|
Add the message type to the container.
- Parameters
-
[in] | message | The message to add to the container. |
- Exceptions
-
std::invalid_argument | if the message type already exists. |
◆ contains() [1/3]
bool UMPS::MessageFormats::Messages::contains |
( |
const IMessage & |
message | ) |
const |
|
noexcept |
- Parameters
-
[in] | message | Determines if the message is set by calling contains(getMessageType()) . |
- Returns
- True indicates the message type exists.
◆ contains() [2/3]
bool UMPS::MessageFormats::Messages::contains |
( |
const std::string & |
messageType | ) |
const |
|
noexcept |
- Parameters
-
[in] | messageType | The name of the message type. |
- Returns
- True indicates the message type exists.
◆ contains() [3/3]
bool UMPS::MessageFormats::Messages::contains |
( |
const std::unique_ptr< IMessage > & |
message | ) |
const |
- Parameters
-
[in] | message | Determines if the message is set by calling contains(getMessageType()) . |
- Returns
- True indicates the message type exists.
- Exceptions
-
std::invalid_argument | if the message is NULL. |
◆ empty()
bool UMPS::MessageFormats::Messages::empty |
( |
| ) |
const |
|
noexcept |
- Returns
- True indicates there are no messages.
◆ get() [1/2]
std::map<std::string, std::unique_ptr<IMessage> > UMPS::MessageFormats::Messages::get |
( |
| ) |
const |
|
noexcept |
- Returns
- All the message types in this container.
◆ get() [2/2]
std::unique_ptr<IMessage> UMPS::MessageFormats::Messages::get |
( |
const std::string & |
messageType | ) |
const |
- Returns
- The message container corresponding to the message type,
◆ operator=() [1/2]
Messages& UMPS::MessageFormats::Messages::operator= |
( |
const Messages & |
messages | ) |
|
Copy assignment operator.
- Parameters
-
[in] | messages | The messages container to copy to this. |
- Returns
- A deep copy of the input messages container.
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
[in,out] | messages | The messages container whose memory will be moved to this. On exit, messageses's behavior is undefined. |
◆ remove() [1/2]
void UMPS::MessageFormats::Messages::remove |
( |
const std::string & |
messageType | ) |
|
- Parameters
-
[in] | messageType | The name of the message type to remove. |
- Exceptions
-
std::runtime_error | if contains(messageType) is false. |
◆ remove() [2/2]
void UMPS::MessageFormats::Messages::remove |
( |
const std::unique_ptr< IMessage > & |
message | ) |
|
Removes the message.
- Exceptions
-
std::invalid_argument | if the message is NULL. |
◆ size()
int UMPS::MessageFormats::Messages::size |
( |
| ) |
const |
|
noexcept |
- Returns
- The number of message formats.
The documentation for this class was generated from the following file: