PhoenixSwarm  5.1.1
Library to ease communication between daemons
Loading...
Searching...
No Matches
CheckStream< Swarm::Stat > Struct Reference

Generic Stat Check function. More...

#include <Representation.h>

Static Public Member Functions

static bool check_stream (const std::string &fieldDescription, const Swarm::Stat &data, const Swarm::Stat &reference, std::ostream &out)
 Check Stream for a Stat.
 

Detailed Description

Generic Stat Check function.

Definition at line 427 of file Representation.h.

Member Function Documentation

◆ check_stream()

bool CheckStream< Swarm::Stat >::check_stream ( const std::string & fieldDescription,
const Swarm::Stat & data,
const Swarm::Stat & reference,
std::ostream & out )
static

Check Stream for a Stat.

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 838 of file Representation.cpp.

838 {
839 bool b(true);
840 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Stat::name", data.getName(), reference.getName(), out);
841 b &= CheckStream<std::map<PString, Swarm::VecStat >>::check_stream(fieldDescription + "\n- Stat::mapStatComputing", data.getMapStatComputing(), reference.getMapStatComputing(), out);
842 b &= CheckStream<std::map<DaemonName, std::map<DataType, Swarm::VecStat > >>::check_stream(fieldDescription + "\n- Stat::mapStatCommunication", data.getMapStatCommunication(), reference.getMapStatCommunication(), out);
843 return b;
844}
const std::map< DaemonName, std::map< DataType, Swarm::VecStat > > & getMapStatCommunication() const
Gets the mapStatCommunication of the Stat.
const PString & getName() const
Gets the name of the Stat.
const std::map< PString, Swarm::VecStat > & getMapStatComputing() const
Gets the mapStatComputing of the Stat.
static bool check_stream(const std::string &fieldDescription, const Swarm::Stat &data, const Swarm::Stat &reference, std::ostream &out)
Check Stream for a Stat.

References check_stream(), Swarm::Stat::getMapStatCommunication(), Swarm::Stat::getMapStatComputing(), and Swarm::Stat::getName().

Referenced by check_stream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this struct was generated from the following files: