16 #ifndef QC_CORE_QUALITY_H 17 #define QC_CORE_QUALITY_H 33 Quality(
unsigned int level = Quality::NullLevel, std::string name =
"");
46 unsigned int getLevel()
const;
47 const std::string& getName()
const;
53 static const unsigned int NullLevel;
57 return (lhs.getName() == rhs.getName() && lhs.getLevel() == rhs.getLevel());
59 friend bool operator!=(
const Quality& lhs,
const Quality& rhs) {
return !operator==(lhs, rhs); }
60 friend std::ostream& operator<<(std::ostream& out,
const Quality& q);
80 void addMetadata(std::string key, std::string value);
84 void addMetadata(std::map<std::string, std::string> pairs);
100 std::map<std::string, std::string> mUserMetadata;
107 #endif // QC_CORE_QUALITY_H virtual ~Quality()=default
Destructor.
Quality(unsigned int level=Quality::NullLevel, std::string name="")
Default constructor.
bool isWorseThan(const Quality &quality) const
Checks whether this quality object is worse than another one. If compared to Null it returns false...
Definition: Quality.h:68
Class representing the quality of a MonitorObject.
Definition: Quality.h:29
void updateMetadata(std::string key, std::string value)
Update the value of metadata. If the key does not exist it will ignore it.
bool isBetterThan(const Quality &quality) const
Checks whether this quality object is better than another one. If compared to Null it returns false...
Definition: Quality.h:75
const std::string getMetadata(std::string key)
Get a metadata.
void overwriteMetadata(std::map< std::string, std::string > pairs)
Overwrite the existing metadata.
Quality & operator=(const Quality &other)=default
Copy assignment operator.
These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19
const std::map< std::string, std::string > & getMetadataMap() const
Get the full map of user's metadata.
void addMetadata(std::string key, std::string value)
Add key value pair that will end up in the database Add a metadata (key value pair) to the QualityObj...