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

Generic Function Check function. More...

#include <Representation.h>

Static Public Member Functions

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

Detailed Description

Generic Function Check function.

Definition at line 160 of file Representation.h.

Member Function Documentation

◆ check_stream()

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

Check Stream for a Function.

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

179 {
180 bool b(true);
181 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Function::name", data.getName(), reference.getName(), out);
182 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Function::description", data.getDescription(), reference.getDescription(), out);
183 b &= CheckStream<std::vector<Swarm::Data>>::check_stream(fieldDescription + "\n- Function::vecParam", data.getVecParam(), reference.getVecParam(), out);
184 b &= CheckStream<Swarm::Data>::check_stream(fieldDescription + "\n- Function::returnValue", data.getReturnValue(), reference.getReturnValue(), out);
185 return b;
186}
const PString & getName() const
Gets the name of the Function.
const std::vector< Swarm::Data > & getVecParam() const
Gets the vecParam of the Function.
const PString & getDescription() const
Gets the description of the Function.
const Swarm::Data & getReturnValue() const
Gets the returnValue of the Function.
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::Function &data, const Swarm::Function &reference, std::ostream &out)
Check Stream for a Function.

References CheckStream< Swarm::Data >::check_stream(), check_stream(), Swarm::Function::getDescription(), Swarm::Function::getName(), Swarm::Function::getReturnValue(), and Swarm::Function::getVecParam().

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: