BDE 4.14.0 Production release
Loading...
Searching...
No Matches
ball_category.h
Go to the documentation of this file.
1/// @file ball_category.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// ball_category.h -*-C++-*-
8#ifndef INCLUDED_BALL_CATEGORY
9#define INCLUDED_BALL_CATEGORY
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup ball_category ball_category
15/// @brief Provide a container for a name and associated thresholds.
16/// @addtogroup bal
17/// @{
18/// @addtogroup ball
19/// @{
20/// @addtogroup ball_category
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#ball_category-purpose"> Purpose</a>
25/// * <a href="#ball_category-classes"> Classes </a>
26/// * <a href="#ball_category-description"> Description </a>
27/// * <a href="#ball_category-ball-private-methods-and-classes"> ball "Private" Methods and Classes </a>
28/// * <a href="#ball_category-ball-categoryholder"> ball::CategoryHolder </a>
29/// * <a href="#ball_category-ball-categorymanagerimputil"> ball::CategoryManagerImpUtil </a>
30/// * <a href="#ball_category-usage"> Usage </a>
31/// * <a href="#ball_category-example-1-basic-use-of-ball-category"> Example 1: Basic Use of ball::Category </a>
32///
33/// # Purpose {#ball_category-purpose}
34/// Provide a container for a name and associated thresholds.
35///
36/// # Classes {#ball_category-classes}
37///
38/// - ball::Category: container for a name and associated threshold levels
39/// - ball::CategoryHolder: *private* holder of a category and its maximum level
40/// - ball::CategoryManagerImpUtil: *private* used in creating a category manager
41///
42/// @see ball_categorymanager
43///
44/// # Description {#ball_category-description}
45/// This component primarily provides a class, `ball::Category`,
46/// used to describe the properties of a logging category. A `ball::Category`
47/// provides access to the category name and the 4 logging threshold levels
48/// associated with a category (see @ref ball_loggermanager for a description of
49/// the purpose of the various thresholds).
50///
51/// ## ball "Private" Methods and Classes {#ball_category-ball-private-methods-and-classes}
52///
53///
54/// This component provides classes that are *not* intended for use by the users
55/// of the `ball` logging sub-system: `ball::CategoryHolder` and
56/// `ball::CategoryManagerImpUtil`. These classes are defined in this component
57/// because they are either friends of `ball::Category` or have a circular
58/// definition with `ball::Category`. They are used within the logging
59/// sub-system to efficiently process log records.
60///
61/// ### ball::CategoryHolder {#ball_category-ball-categoryholder}
62///
63///
64/// A `ball::CategoryHolder` is a statically-initializable pointer to a log
65/// category. It is designed to work with the logging macros provided by `ball`
66/// (see {`ball_log`}), and provide a static cache of the log category at the
67/// point where a log macro is invoked.
68///
69/// ### ball::CategoryManagerImpUtil {#ball_category-ball-categorymanagerimputil}
70///
71///
72/// A `ball::CategoryManagerImpUtil` provides a suite of utility functions used
73/// in creating a manager for log categories (see @ref ball_categorymanager ). A
74/// `ball::Category` object maintains private state that is accessed and
75/// manipulated via this utility. Each `ball::Category` contains private data
76/// members that provide:
77///
78/// * A linked list of associated `ball::CategoryHolder` objects that refer to
79/// the category.
80/// * A cache of the logging rules that apply to the category.
81/// * A cache of the maximum threshold associated with any rule that applies
82/// to the category (this is the threshold at which a more complicated
83/// evaluation of the logging rules and current `ball::AttributeContext` must
84/// be performed).
85///
86/// ## Usage {#ball_category-usage}
87///
88///
89/// This section illustrates intended use of this component.
90///
91/// ### Example 1: Basic Use of ball::Category {#ball_category-example-1-basic-use-of-ball-category}
92///
93///
94/// The following example demonstrates creating a category and accessing its
95/// threshold information.
96///
97/// Note that other components in the logging subsystem provide more user
98/// focused examples of using categories (see @ref ball_loggermanager ,
99/// @ref ball_administration , and @ref ball_categorymanager ).
100///
101/// First we create a simple category, `example`, that has the record-level,
102/// trigger-level, and trigger-all thresholds set to OFF and the pass-level set
103/// to WARN, and verify these values:
104/// @code
105/// ball::Category example("example",
106/// ball::Severity::e_OFF,
107/// ball::Severity::e_WARN,
108/// ball::Severity::e_OFF,
109/// ball::Severity::e_OFF);
110///
111/// assert(0 == bsl::strcmp("example", example.categoryName());
112/// assert(ball::Severity::e_OFF == example.recordLevel());
113/// assert(ball::Severity::e_WARN == example.passLevel());
114/// assert(ball::Severity::e_OFF == example.triggerLevel());
115/// assert(ball::Severity::e_OFF == example.triggerAllLevel());
116/// @endcode
117/// See @ref ball_loggermanager for more information on the use of various
118/// thresholds levels.
119///
120/// Finally, we test if a the category is enabled for log record recorded with
121/// `e_ERROR` severity:
122/// @code
123/// if (example.isEnabled(ball::Severity::e_ERROR)) {
124/// // publish record
125/// }
126/// @endcode
127/// @}
128/** @} */
129/** @} */
130
131/** @addtogroup bal
132 * @{
133 */
134/** @addtogroup ball
135 * @{
136 */
137/** @addtogroup ball_category
138 * @{
139 */
140
141#include <balscm_version.h>
142
143#include <ball_ruleset.h>
145
146#include <bdlb_bitutil.h>
147
148#include <bslma_allocator.h>
150
152
153#include <bslmt_lockguard.h>
154#include <bslmt_mutex.h>
155
156#include <bsls_assert.h>
157#include <bsls_atomic.h>
159#include <bsls_keyword.h>
160#include <bsls_review.h>
161#include <bsls_types.h>
162
163
164namespace ball {
165
166class CategoryHolder;
167
168 // ==============
169 // class Category
170 // ==============
171
172/// This class provides a container to hold the name and threshold levels of
173/// a category. Instances of `Category` are created and manipulated by
174/// `CategoryManager`. All threshold levels are integral values in the
175/// range `[0 .. 255]`.
176///
177/// Implementation Note: The `d_ruleThreshold` and `d_relevantRuleMask`
178/// serve as a cache for logging rule evaluation (see
179/// @ref ball_attributecontext ). They are not meant to be modified by users
180/// of the logging system, and may be modified by `const` operations of the
181/// logging system.
182///
183/// See @ref ball_category
184class Category {
185
186 // DATA
187 ThresholdAggregate d_thresholdLevels; // record, pass, trigger, and
188 // trigger-all levels
189
190 bsls::AtomicInt d_threshold; // numerical maximum of the four
191 // levels
192
193 const bsl::string d_categoryName; // category name
194
195 CategoryHolder *d_categoryHolder_p; // linked list of holders of this
196 // category
197
198 mutable bsls::AtomicOperations::AtomicTypes::Uint
199 d_relevantRuleMask; // the mask indicating which
200 // rules are relevant (i.e., have
201 // been attached to this
202 // category)
203
204 mutable int d_ruleThreshold; // numerical maximum of all four
205 // levels for all relevant rules
206
207 mutable bslmt::Mutex d_mutex; // mutex providing mutually
208 // exclusive access to all
209 // non-atomic members
210
211 // FRIENDS
213
214 // NOT IMPLEMENTED
215 Category(const Category&);
216 Category& operator=(const Category&);
217
218 private:
219 // PRIVATE MANIPULATORS
220
221 /// Load this category and its corresponding `maxLevel()` into the
222 /// specified `categoryHolder`, and add `categoryHolder` to the linked
223 /// list of category holders managed by this category.
224 void linkCategoryHolder(CategoryHolder *categoryHolder);
225
226 /// Reset the category holders to which this category is linked to their
227 /// default value. See the function-level documentation of
228 /// `CategoryHolder::reset` for further information on the default value
229 /// of category holders.
230 void resetCategoryHolders();
231
232 /// Update the threshold of all category holders that hold the address
233 /// of this object to the maximum of `d_threshold` and
234 /// `d_ruleThreshold`. The behavior is undefined unless `d_mutex` is
235 /// locked.
236 void updateThresholdForHolders();
237
238 public:
239 // CLASS METHODS
240
241 /// Return `true` if each of the specified `recordLevel`, `passLevel`,
242 /// `triggerLevel` and `triggerAllLevel` threshold values are in the
243 /// range `[0 .. 255]`, and `false` otherwise.
244 static bool areValidThresholdLevels(int recordLevel,
245 int passLevel,
246 int triggerLevel,
247 int triggerAllLevel);
248
249 // TRAITS
251
252 // CREATORS
253
254 /// Create a category having the specified `categoryName` and the
255 /// specified `recordLevel`, `passLevel`, `triggerLevel`, and
256 /// `triggerAllLevel` threshold values, respectively. Optionally
257 /// specify a `basicAllocator` used to supply memory. If
258 /// `basicAllocator` is 0, the currently installed default allocator is
259 /// used. The behavior is undefined unless each of the specified
260 /// threshold levels is in the range `[0 .. 255]`, and `categoryName` is
261 /// null-terminated.
263 int recordLevel,
264 int passLevel,
265 int triggerLevel,
266 int triggerAllLevel,
267 bslma::Allocator *basicAllocator = 0);
268
269 /// Destroy this object.
270 ~Category() = default;
271
272 // MANIPULATORS
273
274 /// Set the threshold levels of this category to the specified
275 /// `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel`
276 /// values, respectively, if each of the specified values is in the
277 /// range `[0 .. 255]`. Return 0 on success, and a non-zero value
278 /// otherwise (with no effect on the threshold levels of this category).
280 int passLevel,
281 int triggerLevel,
282 int triggerAllLevel);
283
284 // ACCESSORS
285
286 // BDE_VERIFY pragma: push
287 // BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
288
289 /// Return the name of this category.
290 const char *categoryName() const;
291
292 /// Return `true` if logging at the specified `level` is enabled for
293 /// this category, and `false` otherwise. Logging is enabled if `level`
294 /// is numerically less than or equal to any of the four threshold
295 /// levels of this category.
296 bool isEnabled(int level) const;
297
298 /// Return the numerical maximum of the four levels of this category.
299 int maxLevel() const;
300
301 /// Return the record level of this category.
302 int recordLevel() const;
303
304 /// Return the pass level of this category.
305 int passLevel() const;
306
307 /// Return the trigger level of this category.
308 int triggerLevel() const;
309
310 /// Return the trigger-all level of this category.
311 int triggerAllLevel() const;
312
313 /// Return the aggregate threshold levels of this category.
315
316 /// Return the current maximum threshold (i.e., the lowest severity)
317 /// between the `recordLevel`, `passLevel`, `triggerLevel`, and
318 /// `triggerAllLevel`. Note that this is the threshold at which a log
319 /// record having this severity will need to be acted upon.
320 int threshold() const;
321
322 /// Return the current maximum threshold (i.e., the lowest severity) for
323 /// any logging rule associated with this category. Note that the rule
324 /// having this threshold may not be active given the current thread's
325 /// logging context (see `ball::AttributeContext`); this value caches
326 /// the lowest possible severity where the currently rules need to be
327 /// evaluated (log records below this threshold do not need any rule
328 /// evaluation).
329 int ruleThreshold() const;
330
331 /// Return a reference to the non-modifiable relevant rule mask for this
332 /// category. The returned `RuleSet::MaskType` value is a bit-mask,
333 /// where each bit is a boolean value indicating whether the rule at the
334 /// corresponding index (in the rule set of the category manager that
335 /// owns this category) applies at this category. Note that a rule
336 /// applies to this category if the rule's pattern matches the name
337 /// returned by `categoryName`.
339 // BDE_VERIFY pragma: pop
340};
341
342 // ====================
343 // class CategoryHolder
344 // ====================
345
346/// This class, informally referred to as a "category holder" (or simply
347/// "holder"), holds a category, a threshold level, and a pointer to a
348/// "next" holder. Both the category and next pointer may be null. The
349/// intended use is as follows: (1) instances of this class are (only)
350/// declared in contexts where logging occurs; (2) if the held category is
351/// non-null, then the held threshold is the numerical maximum of the four
352/// levels of that category; (3) if the next pointer is non-null, then the
353/// holder pointed to holds the same category and threshold. Instances of
354/// this class must be *statically* initializable. Hence, the data members
355/// are `public`, and automatically generated constructors and destructor
356/// are used.
357///
358/// This class should *not* be used directly by client code. It is an
359/// implementation detail of the `ball` logging system.
360///
361/// See @ref ball_category
363
364 // NOT IMPLEMENTED
366
367 // PRIVATE TYPES
369 typedef bsls::AtomicOperations::AtomicTypes::Int AtomicInt;
370 typedef bsls::AtomicOperations::AtomicTypes::Pointer AtomicPointer;
371
372 public:
373 // PUBLIC TYPES
374
375 /// This enumeration defines distinguished values for category holder
376 /// threshold levels. Note that these values are intentionally outside
377 /// the range `[0 .. 255]`.
378 enum {
379 e_UNINITIALIZED_CATEGORY = 256, // indicates no logger manager
380 e_DYNAMIC_CATEGORY = 257 // corresponding category is dynamic
381 };
382
383 // PUBLIC DATA
384
385 // BDE_VERIFY pragma: push
386 // BDE_VERIFY pragma: -MN01 // Class data members must be private
387 AtomicInt d_threshold; // threshold level
388 AtomicPointer d_category_p; // held category (not owned)
389 AtomicPointer d_next_p; // next category holder in linked list
390 // BDE_VERIFY pragma: pop
391
392 // CREATORS
393
394 // No constructors or destructors are declared in order to allow for static
395 // initialization of instances of this class.
396
397 // MANIPULATORS
398 // BDE_VERIFY pragma: push
399 // BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
400
401 /// Reset this object to its default value. The default value is:
402 /// @code
403 /// { e_UNINITIALIZED_CATEGORY, 0, 0 }
404 /// @endcode
405 void reset();
406
407 /// Set the address of the category held by this holder to the specified
408 /// `category`.
409 void setCategory(const Category *category);
410
411 /// Set the threshold level held by this holder to the specified
412 /// `threshold`.
413 void setThreshold(int threshold);
414
415 /// Set this holder to point to the specified `holder`.
416 void setNext(CategoryHolder *holder);
417
418 // ACCESSORS
419
420 /// Return the address of the non-modifiable category held by this
421 /// holder.
422 const Category *category() const;
423
424 /// Return the threshold level held by this holder.
425 int threshold() const;
426
427 /// Return the address of the modifiable holder held by this holder.
428 CategoryHolder *next() const;
429 // BDE_VERIFY pragma: pop
430};
431
432 // ============================
433 // class CategoryManagerImpUtil
434 // ============================
435
436/// This class provides a suite of free functions used to help implement a
437/// manager of categories and category holders.
438///
439/// This class should *not* be used directly by client code. It is an
440/// implementation detail of the `ball` logging system.
441///
442/// See @ref ball_category
444
445 public:
446 // CLASS METHODS
447
448 // BDE_VERIFY pragma: push
449 // BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
450
451 /// Load the specified `category` and its corresponding `maxLevel()`
452 /// into the specified `categoryHolder`, and add `categoryHolder` to
453 /// the linked list of category holders maintained by `category`.
454 static void linkCategoryHolder(Category *category,
455 CategoryHolder *categoryHolder);
456
457 /// Reset the category holders to which the specified `category` is
458 /// linked to their default value. See the function-level documentation
459 /// of `CategoryHolder::reset` for further information on the default
460 /// value of category holders.
461 static void resetCategoryHolders(Category *category);
462
463 /// Update the threshold of all category holders that hold the address
464 /// of the specified `category` object to the maximum of `d_threshold`
465 /// and `d_ruleThreshold`.
466 static void updateThresholdForHolders(Category *category);
467
468 /// Set the cached rule threshold for the specified `category` to the
469 /// specified `ruleThreshold`.
470 static void setRuleThreshold(Category *category, int ruleThreshold);
471
472 /// Set the bit in the relevant rule-mask at the specified `ruleIndex`
473 /// in the specified `category` to `true`.
474 static void enableRule(Category *category, int ruleIndex);
475
476 /// Set the bit in the rule-mask at the specified `ruleIndex` in the
477 /// specified `category` to `false`.
478 static void disableRule(Category *category, int ruleIndex);
479
480 /// Set the rule-mask for the specified `category` to the specified
481 /// `mask`.
482 static void setRelevantRuleMask(Category *category,
483 RuleSet::MaskType mask);
484 // BDE_VERIFY pragma: pop
485};
486
487// ============================================================================
488// INLINE DEFINITIONS
489// ============================================================================
490
491 // --------------
492 // class Category
493 // --------------
494
495// BDE_VERIFY pragma: push
496// BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
497
498// CLASS METHODS
499inline
501 int passLevel,
502 int triggerLevel,
503 int triggerAllLevel)
504{
505 enum { k_BITS_PER_CHAR = 8 };
506
508 >> k_BITS_PER_CHAR);
509}
510
511// ACCESSORS
512inline
513const char *Category::categoryName() const
514{
515 return d_categoryName.c_str();
516}
517
518inline
519bool Category::isEnabled(int level) const
520{
521 return d_threshold >= level;
522}
523
524inline
526{
527 return d_threshold;
528}
529
530inline
532{
533 bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex);
534 return d_thresholdLevels.recordLevel();
535}
536
537inline
539{
540 bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex);
541 return d_thresholdLevels.passLevel();
542}
543
544inline
546{
547 bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex);
548 return d_thresholdLevels.triggerLevel();
549}
550
551inline
553{
554 bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex);
555 return d_thresholdLevels.triggerAllLevel();
556}
557
558inline
560{
561 bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex);
562 return d_thresholdLevels;
563}
564
565inline
567{
568 return d_threshold;
569}
570
571inline
573{
574 bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex);
575 return d_ruleThreshold;
576}
577
578inline
583
584 // --------------------
585 // class CategoryHolder
586 // --------------------
587
588// MANIPULATORS
589inline
591{
593}
594
595inline
600
601inline
606
607// ACCESSORS
608inline
610{
611 return reinterpret_cast<const Category *>(
613}
614
615inline
620
621inline
623{
624 return reinterpret_cast<CategoryHolder *>(
626}
627
628 // ----------------------------
629 // class CategoryManagerImpUtil
630 // ----------------------------
631
632// CLASS METHODS
633inline
635 CategoryHolder *categoryHolder)
636{
637 BSLS_ASSERT(category);
638 BSLS_ASSERT(categoryHolder);
639
640 category->linkCategoryHolder(categoryHolder);
641}
642
643inline
645{
646 BSLS_ASSERT(category);
647
648 category->resetCategoryHolders();
649}
650
651inline
653{
654 BSLS_ASSERT(category);
655
656 bslmt::LockGuard<bslmt::Mutex> guard(&category->d_mutex);
657 category->updateThresholdForHolders();
658}
659
660inline
662 int ruleThreshold)
663{
664 bslmt::LockGuard<bslmt::Mutex> guard(&category->d_mutex);
665 category->d_ruleThreshold = ruleThreshold;
666}
667
668inline
669void CategoryManagerImpUtil::enableRule(Category *category, int ruleIndex)
670{
671 unsigned int currentMask =
672 bsls::AtomicOperations::getUintRelaxed(&category->d_relevantRuleMask);
673 unsigned int expectedMask;
674 do {
675 const unsigned int updatedMask = bdlb::BitUtil::withBitSet(currentMask,
676 ruleIndex);
677 expectedMask = currentMask;
679 &category->d_relevantRuleMask,
680 currentMask,
681 updatedMask);
682 } while (expectedMask != currentMask);
683}
684
685inline
686void CategoryManagerImpUtil::disableRule(Category *category, int ruleIndex)
687{
688 unsigned int currentMask =
689 bsls::AtomicOperations::getUintRelaxed(&category->d_relevantRuleMask);
690 unsigned int expectedMask;
691 do {
692 const unsigned int updatedMask =
693 bdlb::BitUtil::withBitCleared(currentMask, ruleIndex);
694 expectedMask = currentMask;
696 &category->d_relevantRuleMask,
697 currentMask,
698 updatedMask);
699 } while (expectedMask != currentMask);
700}
701
702inline
705{
706 bsls::AtomicOperations::setUintRelease(&category->d_relevantRuleMask,
707 mask);
708}
709
710// BDE_VERIFY pragma: pop
711
712} // close package namespace
713
714
715#endif
716
717// ----------------------------------------------------------------------------
718// Copyright 2015 Bloomberg Finance L.P.
719//
720// Licensed under the Apache License, Version 2.0 (the "License");
721// you may not use this file except in compliance with the License.
722// You may obtain a copy of the License at
723//
724// http://www.apache.org/licenses/LICENSE-2.0
725//
726// Unless required by applicable law or agreed to in writing, software
727// distributed under the License is distributed on an "AS IS" BASIS,
728// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
729// See the License for the specific language governing permissions and
730// limitations under the License.
731// ----------------------------- END-OF-FILE ----------------------------------
732
733/** @} */
734/** @} */
735/** @} */
Definition ball_category.h:362
int threshold() const
Return the threshold level held by this holder.
Definition ball_category.h:616
AtomicPointer d_category_p
Definition ball_category.h:388
void setCategory(const Category *category)
Definition ball_category.h:590
void setNext(CategoryHolder *holder)
Set this holder to point to the specified holder.
Definition ball_category.h:602
CategoryHolder * next() const
Return the address of the modifiable holder held by this holder.
Definition ball_category.h:622
const Category * category() const
Definition ball_category.h:609
AtomicPointer d_next_p
Definition ball_category.h:389
@ e_DYNAMIC_CATEGORY
Definition ball_category.h:380
@ e_UNINITIALIZED_CATEGORY
Definition ball_category.h:379
void setThreshold(int threshold)
Definition ball_category.h:596
AtomicInt d_threshold
Definition ball_category.h:387
Definition ball_category.h:443
static void updateThresholdForHolders(Category *category)
Definition ball_category.h:652
static void enableRule(Category *category, int ruleIndex)
Definition ball_category.h:669
static void disableRule(Category *category, int ruleIndex)
Definition ball_category.h:686
static void setRuleThreshold(Category *category, int ruleThreshold)
Definition ball_category.h:661
static void linkCategoryHolder(Category *category, CategoryHolder *categoryHolder)
Definition ball_category.h:634
static void setRelevantRuleMask(Category *category, RuleSet::MaskType mask)
Definition ball_category.h:703
static void resetCategoryHolders(Category *category)
Definition ball_category.h:644
Definition ball_category.h:184
int maxLevel() const
Return the numerical maximum of the four levels of this category.
Definition ball_category.h:525
int triggerLevel() const
Return the trigger level of this category.
Definition ball_category.h:545
~Category()=default
Destroy this object.
Category(const char *categoryName, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel, bslma::Allocator *basicAllocator=0)
int triggerAllLevel() const
Return the trigger-all level of this category.
Definition ball_category.h:552
const char * categoryName() const
Return the name of this category.
Definition ball_category.h:513
static bool areValidThresholdLevels(int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
Definition ball_category.h:500
BSLMF_NESTED_TRAIT_DECLARATION(Category, bslma::UsesBslmaAllocator)
RuleSet::MaskType relevantRuleMask() const
Definition ball_category.h:579
int ruleThreshold() const
Definition ball_category.h:572
int recordLevel() const
Return the record level of this category.
Definition ball_category.h:531
int setLevels(int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
ThresholdAggregate thresholdLevels() const
Return the aggregate threshold levels of this category.
Definition ball_category.h:559
int passLevel() const
Return the pass level of this category.
Definition ball_category.h:538
bool isEnabled(int level) const
Definition ball_category.h:519
int threshold() const
Definition ball_category.h:566
unsigned int MaskType
Definition ball_ruleset.h:158
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
int passLevel() const
Return the pass level of this threshold aggregate.
Definition ball_thresholdaggregate.h:254
int triggerAllLevel() const
Return the trigger-all level of this threshold aggregate.
Definition ball_thresholdaggregate.h:266
Definition bslstl_string.h:1281
const CHAR_TYPE * c_str() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:6705
Definition bslma_allocator.h:457
Definition bslmt_lockguard.h:234
Definition bslmt_mutex.h:315
Definition bsls_atomic.h:743
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:609
Definition ball_administration.h:214
static unsigned int withBitSet(unsigned int value, int index)
Definition bdlb_bitutil.h:605
static unsigned int withBitCleared(unsigned int value, int index)
Definition bdlb_bitutil.h:581
Definition bslma_usesbslmaallocator.h:343
Definition bsls_atomicoperations.h:834
static unsigned int getUintAcquire(AtomicTypes::Uint const *atomicUint)
Definition bsls_atomicoperations.h:1908
static unsigned int getUintRelaxed(AtomicTypes::Uint const *atomicUint)
Definition bsls_atomicoperations.h:1915
static void setUintRelease(AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations.h:1943
static void * getPtrAcquire(AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations.h:2312
static void setIntRelaxed(AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations.h:1552
static unsigned int testAndSwapUintAcqRel(AtomicTypes::Uint *atomicUint, unsigned int compareValue, unsigned int swapValue)
Definition bsls_atomicoperations.h:1972
static int getIntRelaxed(AtomicTypes::Int const *atomicInt)
Definition bsls_atomicoperations.h:1534
static void setPtrRelease(AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations.h:2345