Added method for incrementing the repetition count manually.
This commit is contained in:
@@ -111,4 +111,8 @@ size_t msgPrintControl::repetitionCount(msgPrintControlKey &key) {
|
||||
return map_[key];
|
||||
}
|
||||
|
||||
void msgPrintControl::incrementRepetitionCount(msgPrintControlKey &key) {
|
||||
map_[key]++;
|
||||
}
|
||||
|
||||
char *msgPrintControl::getSuffix() { return suffix_; }
|
||||
+12
-1
@@ -197,13 +197,24 @@ class HIDDEN msgPrintControl {
|
||||
* @brief Returns the repetition count for the given key.
|
||||
*
|
||||
* If the key does not exist in the internal map of msgPrintControl, this
|
||||
* method returns 0.
|
||||
* method inserts it with value 0 and returns 0.
|
||||
*
|
||||
* @param key
|
||||
* @return size_t
|
||||
*/
|
||||
size_t repetitionCount(msgPrintControlKey &key);
|
||||
|
||||
/**
|
||||
* @brief Increment the repetition count for the given key by 1.
|
||||
*
|
||||
* If the key does not exist in the internal map of msgPrintControl, this
|
||||
* method inserts it with value 1.
|
||||
*
|
||||
* @param key
|
||||
* @return size_t
|
||||
*/
|
||||
void incrementRepetitionCount(msgPrintControlKey &key);
|
||||
|
||||
/**
|
||||
* @brief shouldBePrinted might create a suffix ("maximum number of
|
||||
* repetitions reached, further messages will be suppressed until reset.").
|
||||
|
||||
Reference in New Issue
Block a user