8#ifndef INCLUDED_BALL_THRESHOLDAGGREGATE
9#define INCLUDED_BALL_THRESHOLDAGGREGATE
83#include <balscm_version.h>
85#include <bsl_iosfwd.h>
100 unsigned char d_recordLevel;
101 unsigned char d_passLevel;
102 unsigned char d_triggerLevel;
103 unsigned char d_triggerAllLevel;
214 bsl::ostream&
print(bsl::ostream& stream,
216 int spacesPerLevel = 4)
const;
250 return d_recordLevel;
262 return d_triggerLevel;
268 return d_triggerAllLevel;
278 enum { k_BITS_PER_CHAR = 8 };
297, d_triggerAllLevel(0)
306: d_recordLevel(static_cast<unsigned char>(recordLevel))
307, d_passLevel(static_cast<unsigned char>(passLevel))
308, d_triggerLevel(static_cast<unsigned char>(triggerLevel))
309, d_triggerAllLevel(static_cast<unsigned char>(triggerAllLevel))
315: d_recordLevel(original.d_recordLevel)
316, d_passLevel(original.d_passLevel)
317, d_triggerLevel(original.d_triggerLevel)
318, d_triggerAllLevel(original.d_triggerAllLevel)
326 d_recordLevel =
static_cast<unsigned char>(
recordLevel);
332 d_passLevel =
static_cast<unsigned char>(
passLevel);
338 d_triggerLevel =
static_cast<unsigned char>(
triggerLevel);
352 const ThresholdAggregate& rhs)
354 return lhs.d_recordLevel == rhs.d_recordLevel
355 && lhs.d_passLevel == rhs.d_passLevel
356 && lhs.d_triggerLevel == rhs.d_triggerLevel
357 && lhs.d_triggerAllLevel == rhs.d_triggerAllLevel;
362 const ThresholdAggregate& rhs)
364 return !(lhs == rhs);
369 const ThresholdAggregate& aggregate)
371 return aggregate.print(stream, 0, -1);
Definition ball_thresholdaggregate.h:97
int triggerLevel() const
Return the trigger level of this threshold aggregate.
Definition ball_thresholdaggregate.h:260
int recordLevel() const
Return the record level of this threshold aggregate.
Definition ball_thresholdaggregate.h:248
~ThresholdAggregate()=default
Destroy this object.
void setRecordLevel(int recordLevel)
Definition ball_thresholdaggregate.h:324
void setTriggerAllLevel(int triggerAllLevel)
Definition ball_thresholdaggregate.h:342
int passLevel() const
Return the pass level of this threshold aggregate.
Definition ball_thresholdaggregate.h:254
void setTriggerLevel(int triggerLevel)
Definition ball_thresholdaggregate.h:336
friend bool operator==(const ThresholdAggregate &, const ThresholdAggregate &)
void setPassLevel(int passLevel)
Definition ball_thresholdaggregate.h:330
static int hash(const ThresholdAggregate &aggregate, int size)
ThresholdAggregate & operator=(const ThresholdAggregate &rhs)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static int maxLevel(int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
ThresholdAggregate()
Create a threshold aggregate whose threshold levels are all 0.
Definition ball_thresholdaggregate.h:293
int setLevels(int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
static bool areValidThresholdLevels(int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
Definition ball_thresholdaggregate.h:273
int triggerAllLevel() const
Return the trigger-all level of this threshold aggregate.
Definition ball_thresholdaggregate.h:266
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition ball_administration.h:214
bsl::ostream & operator<<(bsl::ostream &output, const Attribute &attribute)
bool operator!=(const Attribute &lhs, const Attribute &rhs)
bool operator==(const Attribute &lhs, const Attribute &rhs)