|
| IpcMessage () noexcept=default |
| Creates an empty and valid IPC channel message.
|
|
| IpcMessage (const std::initializer_list< std::string > &msg) noexcept |
| Creates a separator separated string. If one element contains a separator symbol the IpcMessage becomes invalid and returns false on isValid(). More...
|
|
| IpcMessage (const std::string &msg) noexcept |
| Takes a separator separated string and interprets it as a IpcMessage. In this case the IpcMessage can only become invalid if it is not empty and does not end with the separator. More...
|
|
template<typename T > |
IpcMessage & | operator<< (const T &entry) noexcept |
| Adds a new entry to the IpcMessage, if the entry is invalid no entry is added and the IpcMessage becomes invalid. More...
|
|
uint32_t | getNumberOfElements () const noexcept |
| Returns the number of entries stored in IpcMessage. If the message is invalid the return value is undefined. More...
|
|
std::string | getElementAtIndex (const uint32_t index) const noexcept |
| Returns the entry at position f_index. If f_index is larger then the sum of the entries stored in IpcMessage it returns std::string() More...
|
|
bool | isValidEntry (const std::string &entry) const noexcept |
| returns if an entry is valid. Non valid entries are containing at least one separator More...
|
|
bool | isValid () const noexcept |
| check if the message is valid More...
|
|
std::string | getMessage () const noexcept |
| The message is casted to the actual separator separated string If the message is invalid the return value is undefined. More...
|
|
void | setMessage (const std::string &msg) noexcept |
| Takes a separator separated string and interprets it as a IpcMessage. In this case the IpcMessage can only become invalid if it is not empty and does not end with the separator. All the entries that were stored previously in the IpcMessage will be cleared after a call to setMessage. More...
|
|
void | clearMessage () noexcept |
| Clears the message. After a call to clearMessage() the.
|
|
template<typename T > |
void | addEntry (const T &entry) noexcept |
| Adds a new entry to the IpcMessage, if the entry is invalid no entry is added and the IpcMessage becomes invalid. More...
|
|
bool | operator== (const IpcMessage &rhs) const noexcept |
| Compares two IpcMessages to be equal. More...
|
|
The symbol , is per default the separator.
A valid entry is an arbitrary string which does not contain the separator symbol, otherwise, if it contains the separator symbol it is defined as a invalid entry. A valid entry can contain none or more characters.
A message is a concatination of valid entries separated by the separator. A message is defined as valid if all entries contained in that message are valid and it ends with the separator or it is empty, otherwise it is defined as invalid.