Generic Message Check function.
More...
#include <Representation.h>
Generic Message Check function.
Definition at line 250 of file Representation.h.
◆ check_stream()
| bool CheckStream< Message >::check_stream |
( |
const std::string & | fieldDescription, |
|
|
const Message & | data, |
|
|
const Message & | reference, |
|
|
std::ostream & | out ) |
|
static |
Check Stream for a Message.
- Parameters
-
| fieldDescription | : description of the field to be checked |
| data | : data to be checked |
| reference | : reference of the check |
| out | : ostream used to collect feed back in case of error (std::cerr or a logger) |
- Returns
- true on success, false otherwise
Definition at line 328 of file Representation.cpp.
328 {
329 bool b(true);
330 b &= CheckStream<time_t>::check_stream(fieldDescription +
"\n- Message::sendTime", data.
getSendTime(), reference.
getSendTime(), out);
331 b &= CheckStream<size_t>::check_stream(fieldDescription +
"\n- Message::id", data.
getId(), reference.
getId(), out);
333 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Message::sender", data.
getSender(), reference.
getSender(), out);
335 b &= CheckStream<MessageType::MessageType>::check_stream(fieldDescription +
"\n- Message::type", data.
getType(), reference.
getType(), out);
337 return b;
338}
const PString & getSender() const
Gets the sender of the Message.
const std::vector< PString > & getVecRecver() const
Gets the vecRecver of the Message.
const Data & getData() const
Gets the data of the Message.
size_t getId() const
Gets the id of the Message.
bool getIsConfirmationNeeded() const
Gets the isConfirmationNeeded of the Message.
const MessageType::MessageType & getType() const
Gets the type of the Message.
const time_t & getSendTime() const
Gets the sendTime of the Message.
static bool check_stream(const std::string &fieldDescription, const Data &data, const Data &reference, std::ostream &out)
Check Stream for a Data.
static bool check_stream(const std::string &fieldDescription, const Message &data, const Message &reference, std::ostream &out)
Check Stream for a Message.
References CheckStream< Data >::check_stream(), check_stream(), Message::getData(), Message::getId(), Message::getIsConfirmationNeeded(), Message::getSender(), Message::getSendTime(), Message::getType(), and Message::getVecRecver().
Referenced by check_stream().
The documentation for this struct was generated from the following files:
- /builds/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixSwarm/src/Representation/Representation.h
- /builds/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixSwarm/src/Representation/Representation.cpp