Generic Message Check function.
More...
#include <Representation.h>
Generic Message Check function.
Definition at line 251 of file Representation.h.
◆ check_stream()
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 330 of file Representation.cpp.
330 {
331 bool b(true);
332 b &= CheckStream<time_t>::check_stream(fieldDescription +
"\n- Message::sendTime", data.
getSendTime(), reference.
getSendTime(), out);
333 b &= CheckStream<size_t>::check_stream(fieldDescription +
"\n- Message::id", data.
getId(), reference.
getId(), out);
335 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Message::sender", data.
getSender(), reference.
getSender(), out);
337 b &= CheckStream<MessageType::MessageType>::check_stream(fieldDescription +
"\n- Message::type", data.
getType(), reference.
getType(), out);
339 return b;
340}
const PString & getSender() const
Gets the sender of the Message.
const std::vector< PString > & getVecRecver() const
Gets the vecRecver of the Message.
const Swarm::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 Swarm::Data &data, const Swarm::Data &reference, std::ostream &out)
Check Stream for a Data.
static bool check_stream(const std::string &fieldDescription, const Swarm::Message &data, const Swarm::Message &reference, std::ostream &out)
Check Stream for a Message.
References CheckStream< Swarm::Data >::check_stream(), check_stream(), Swarm::Message::getData(), Swarm::Message::getId(), Swarm::Message::getIsConfirmationNeeded(), Swarm::Message::getSender(), Swarm::Message::getSendTime(), Swarm::Message::getType(), and Swarm::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