BDE 4.39.x 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
161#include <bsl_string_view.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 private:
186 // DATA
187 bsls::AtomicUint d_thresholdLevels; // record, pass, trigger, and
188 // trigger-all levels
189
190 bsls::AtomicInt d_threshold; // numerical maximum of the
191 // four levels
192
193 const bsl::string d_categoryName; // category name
194
195 CategoryHolder *d_categoryHolder_p; // linked list of holders
196 // of this category
197
198 mutable bsls::AtomicUint d_relevantRuleMask; // the mask indicating which
199 // rules are relevant (i.e.,
200 // have been attached to this
201 // category)
202
203 mutable bsls::AtomicInt d_ruleThreshold ; // numerical maximum of all
204 // four levels for all
205 // 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 private:
215 // NOT IMPLEMENTED
216 Category(const Category&);
217 Category& operator=(const Category&);
218
219 private:
220 // PRIVATE MANIPULATORS
221
222 /// Load this category and its corresponding `maxLevel()` into the
223 /// specified `categoryHolder`, and add `categoryHolder` to the linked
224 /// list of category holders managed by this category.
225 void linkCategoryHolder(CategoryHolder *categoryHolder);
226
227 /// Reset the category holders to which this category is linked to their
228 /// default value. See the function-level documentation of
229 /// `CategoryHolder::reset` for further information on the default value
230 /// of category holders.
231 void resetCategoryHolders();
232
233 /// Update the threshold of all category holders that hold the address
234 /// of this object to the maximum of `d_threshold` and `d_ruleThreshold`.
235 ///
236 /// \pre The behavior is undefined unless `d_mutex` is
237 /// locked.
238 void updateThresholdForHolders();
239
240 public:
241 // CLASS METHODS
242
243 /// Return `true` if each of the specified `recordLevel`, `passLevel`,
244 /// `triggerLevel` and `triggerAllLevel` threshold values are in the
245 /// range `[0 .. 255]`, and `false` otherwise.
246 static bool areValidThresholdLevels(int recordLevel,
247 int passLevel,
248 int triggerLevel,
249 int triggerAllLevel);
250
251 // TRAITS
253
254 // CREATORS
255
256 /// Create a category having the specified `categoryName` and the
257 /// specified `recordLevel`, `passLevel`, `triggerLevel`, and
258 /// `triggerAllLevel` threshold values, respectively. Optionally
259 /// specify a `basicAllocator` used to supply memory. If
260 /// `basicAllocator` is 0, the currently installed default allocator is used.
261 ///
262 /// \pre The behavior is undefined unless each of the specified
263 /// threshold levels is in the range `[0 .. 255]`.
265 int recordLevel,
266 int passLevel,
267 int triggerLevel,
268 int triggerAllLevel,
269 bslma::Allocator *basicAllocator = 0);
270
271 /// Destroy this object.
272 ~Category() = default;
273
274 // MANIPULATORS
275
276 /// Set the threshold levels of this category to the specified
277 /// `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel`
278 /// values, respectively, if each of the specified values is in the
279 /// range `[0 .. 255]`. Return 0 on success, and a non-zero value
280 /// otherwise (with no effect on the threshold levels of this category).
282 int passLevel,
283 int triggerLevel,
284 int triggerAllLevel);
285
286 // ACCESSORS
287
288 // BDE_VERIFY pragma: push
289 // BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
290
291 /// Return the name of this category.
292 const char *categoryName() const;
293
294 /// Return `true` if logging at the specified `level` is enabled for
295 /// this category, and `false` otherwise. Logging is enabled if `level`
296 /// is numerically less than or equal to any of the four threshold
297 /// levels of this category.
298 bool isEnabled(int level) const;
299
300 /// Return the numerical maximum of the four levels of this category.
301 int maxLevel() const;
302
303 /// Return the record level of this category.
304 int recordLevel() const;
305
306 /// Return the pass level of this category.
307 int passLevel() const;
308
309 /// Return the trigger level of this category.
310 int triggerLevel() const;
311
312 /// Return the trigger-all level of this category.
313 int triggerAllLevel() const;
314
315 /// Return the aggregate threshold levels of this category.
317
318 /// Return the current maximum threshold (i.e., the lowest severity)
319 /// between the `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel`.
320 ///
321 /// \note Note that this is the threshold at which a log
322 /// record having this severity will need to be acted upon.
323 int threshold() const;
324
325 /// Return the current maximum threshold (i.e., the lowest severity) for any logging rule associated with this category.
326 ///
327 /// \note Note that the rule
328 /// having this threshold may not be active given the current thread's
329 /// logging context (see `ball::AttributeContext`); this value caches
330 /// the lowest possible severity where the currently rules need to be
331 /// evaluated (log records below this threshold do not need any rule
332 /// evaluation).
333 int ruleThreshold() const;
334
335 /// Return a reference to the non-modifiable relevant rule mask for this
336 /// category. The returned `RuleSet::MaskType` value is a bit-mask,
337 /// where each bit is a boolean value indicating whether the rule at the
338 /// corresponding index (in the rule set of the category manager that owns this category) applies at this category.
339 ///
340 /// \note Note that a rule
341 /// applies to this category if the rule's pattern matches the name
342 /// returned by `categoryName`.
344 // BDE_VERIFY pragma: pop
345};
346
347 // ====================
348 // class CategoryHolder
349 // ====================
350
351/// This class, informally referred to as a "category holder" (or simply
352/// "holder"), holds a category, a threshold level, and a pointer to a
353/// "next" holder. Both the category and next pointer may be null. The
354/// intended use is as follows: (1) instances of this class are (only)
355/// declared in contexts where logging occurs; (2) if the held category is
356/// non-null, then the held threshold is the numerical maximum of the four
357/// levels of that category; (3) if the next pointer is non-null, then the
358/// holder pointed to holds the same category and threshold. Instances of
359/// this class must be *statically* initializable. Hence, the data members
360/// are `public`, and automatically generated constructors and destructor
361/// are used.
362///
363/// This class should *not* be used directly by client code. It is an
364/// implementation detail of the `ball` logging system.
365///
366/// See @ref ball_category
368
369 private:
370 // NOT IMPLEMENTED
372
373 // PRIVATE TYPES
375 typedef bsls::AtomicOperations::AtomicTypes::Int AtomicInt;
376 typedef bsls::AtomicOperations::AtomicTypes::Pointer AtomicPointer;
377
378 public:
379 // PUBLIC TYPES
380
381 /// This enumeration defines distinguished values for category holder threshold levels.
382 ///
383 /// \note Note that these values are intentionally outside
384 /// the range `[0 .. 255]`.
385 enum {
386 e_UNINITIALIZED_CATEGORY = 256, // indicates no logger manager
387 e_DYNAMIC_CATEGORY = 257 // corresponding category is dynamic
388 };
389
390 // PUBLIC DATA
391
392 // BDE_VERIFY pragma: push
393 // BDE_VERIFY pragma: -MN01 // Class data members must be private
394 AtomicInt d_threshold; // threshold level
395 AtomicPointer d_category_p; // held category (not owned)
396 AtomicPointer d_next_p; // next category holder in linked list
397 // BDE_VERIFY pragma: pop
398
399 // CREATORS
400
401 // No constructors or destructors are declared in order to allow for static
402 // initialization of instances of this class.
403
404 // MANIPULATORS
405 // BDE_VERIFY pragma: push
406 // BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
407
408 /// Reset this object to its default value. The default value is:
409 /// @code
410 /// { e_UNINITIALIZED_CATEGORY, 0, 0 }
411 /// @endcode
412 void reset();
413
414 /// Set the address of the category held by this holder to the specified
415 /// `category`.
416 void setCategory(const Category *category);
417
418 /// Set the threshold level held by this holder to the specified
419 /// `threshold`.
420 void setThreshold(int threshold);
421
422 /// Set this holder to point to the specified `holder`.
423 void setNext(CategoryHolder *holder);
424
425 // ACCESSORS
426
427 /// Return the address of the non-modifiable category held by this
428 /// holder.
429 const Category *category() const;
430
431 /// Return the threshold level held by this holder.
432 int threshold() const;
433
434 /// Return the address of the modifiable holder held by this holder.
435 CategoryHolder *next() const;
436 // BDE_VERIFY pragma: pop
437};
438
439 // ============================
440 // class CategoryManagerImpUtil
441 // ============================
442
443/// This class provides a suite of free functions used to help implement a
444/// manager of categories and category holders.
445///
446/// This class should *not* be used directly by client code. It is an
447/// implementation detail of the `ball` logging system.
448///
449/// See @ref ball_category
451
452 public:
453 // CLASS METHODS
454
455 // BDE_VERIFY pragma: push
456 // BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
457
458 /// Load the specified `category` and its corresponding `maxLevel()`
459 /// into the specified `categoryHolder`, and add `categoryHolder` to
460 /// the linked list of category holders maintained by `category`.
461 static void linkCategoryHolder(Category *category,
462 CategoryHolder *categoryHolder);
463
464 /// Reset the category holders to which the specified `category` is
465 /// linked to their default value. See the function-level documentation
466 /// of `CategoryHolder::reset` for further information on the default
467 /// value of category holders.
468 static void resetCategoryHolders(Category *category);
469
470 /// Update the threshold of all category holders that hold the address
471 /// of the specified `category` object to the maximum of `d_threshold`
472 /// and `d_ruleThreshold`.
473 static void updateThresholdForHolders(Category *category);
474
475 /// Set the cached rule threshold for the specified `category` to the
476 /// specified `ruleThreshold`.
477 static void setRuleThreshold(Category *category, int ruleThreshold);
478
479 /// Set the bit in the relevant rule-mask at the specified `ruleIndex`
480 /// in the specified `category` to `true`.
481 static void enableRule(Category *category, int ruleIndex);
482
483 /// Set the bit in the rule-mask at the specified `ruleIndex` in the
484 /// specified `category` to `false`.
485 static void disableRule(Category *category, int ruleIndex);
486
487 /// Set the rule-mask for the specified `category` to the specified
488 /// `mask`.
489 static void setRelevantRuleMask(Category *category,
490 RuleSet::MaskType mask);
491 // BDE_VERIFY pragma: pop
492};
493
494// ============================================================================
495// INLINE DEFINITIONS
496// ============================================================================
497
498 // --------------
499 // class Category
500 // --------------
501
502// BDE_VERIFY pragma: push
503// BDE_VERIFY pragma: -FABC01: Functions not in alphanumeric order
504
505// CLASS METHODS
506inline
508 int passLevel,
509 int triggerLevel,
510 int triggerAllLevel)
511{
512 enum { k_BITS_PER_CHAR = 8 };
513
515 >> k_BITS_PER_CHAR);
516}
517
518// ACCESSORS
519inline
520const char *Category::categoryName() const
521{
522 return d_categoryName.c_str();
523}
524
525inline
526bool Category::isEnabled(int level) const
527{
528 return d_threshold >= level;
529}
530
531inline
533{
534 return d_threshold;
535}
536
537inline
539{
540 return ThresholdAggregateUtil::unpack(d_thresholdLevels.loadAcquire())
541 .recordLevel();
542}
543
544inline
546{
547 return ThresholdAggregateUtil::unpack(d_thresholdLevels.loadAcquire())
548 .passLevel();
549}
550
551inline
553{
554 return ThresholdAggregateUtil::unpack(d_thresholdLevels.loadAcquire())
555 .triggerLevel();
556}
557
558inline
560{
561 return ThresholdAggregateUtil::unpack(d_thresholdLevels.loadAcquire())
563}
564
565inline
570
571inline
573{
574 return d_threshold;
575}
576
577inline
579{
580 return d_ruleThreshold.loadAcquire();
581}
582
583inline
585{
586 return d_relevantRuleMask.loadAcquire();
587}
588
589 // --------------------
590 // class CategoryHolder
591 // --------------------
592
593// MANIPULATORS
594inline
596{
598}
599
600inline
605
606inline
611
612// ACCESSORS
613inline
615{
616 return reinterpret_cast<const Category *>(
618}
619
620inline
625
626inline
628{
629 return reinterpret_cast<CategoryHolder *>(
631}
632
633 // ----------------------------
634 // class CategoryManagerImpUtil
635 // ----------------------------
636
637// CLASS METHODS
638inline
640 CategoryHolder *categoryHolder)
641{
642 BSLS_ASSERT(category);
643 BSLS_ASSERT(categoryHolder);
644
645 category->linkCategoryHolder(categoryHolder);
646}
647
648inline
650{
651 BSLS_ASSERT(category);
652
653 category->resetCategoryHolders();
654}
655
656inline
658{
659 BSLS_ASSERT(category);
660
661 bslmt::LockGuard<bslmt::Mutex> guard(&category->d_mutex);
662 category->updateThresholdForHolders();
663}
664
665inline
667 int ruleThreshold)
668{
669 bslmt::LockGuard<bslmt::Mutex> guard(&category->d_mutex);
670 category->d_ruleThreshold.storeRelease(ruleThreshold);
671}
672
673inline
674void CategoryManagerImpUtil::enableRule(Category *category, int ruleIndex)
675{
676 unsigned int currentMask = category->d_relevantRuleMask.loadRelaxed();
677 unsigned int expectedMask;
678 do {
679 const unsigned int updatedMask = bdlb::BitUtil::withBitSet(currentMask,
680 ruleIndex);
681 expectedMask = currentMask;
682 currentMask = category->d_relevantRuleMask.testAndSwapAcqRel(
683 currentMask,
684 updatedMask);
685 } while (expectedMask != currentMask);
686}
687
688inline
689void CategoryManagerImpUtil::disableRule(Category *category, int ruleIndex)
690{
691 unsigned int currentMask = category->d_relevantRuleMask.loadRelaxed();
692 unsigned int expectedMask;
693 do {
694 const unsigned int updatedMask =
695 bdlb::BitUtil::withBitCleared(currentMask, ruleIndex);
696 expectedMask = currentMask;
697 currentMask = category->d_relevantRuleMask.testAndSwapAcqRel(
698 currentMask,
699 updatedMask);
700 } while (expectedMask != currentMask);
701}
702
703inline
706{
707 category->d_relevantRuleMask.storeRelease(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:367
int threshold() const
Return the threshold level held by this holder.
Definition ball_category.h:621
AtomicPointer d_category_p
Definition ball_category.h:395
void setCategory(const Category *category)
Definition ball_category.h:595
void setNext(CategoryHolder *holder)
Set this holder to point to the specified holder.
Definition ball_category.h:607
CategoryHolder * next() const
Return the address of the modifiable holder held by this holder.
Definition ball_category.h:627
const Category * category() const
Definition ball_category.h:614
AtomicPointer d_next_p
Definition ball_category.h:396
@ e_DYNAMIC_CATEGORY
Definition ball_category.h:387
@ e_UNINITIALIZED_CATEGORY
Definition ball_category.h:386
void setThreshold(int threshold)
Definition ball_category.h:601
AtomicInt d_threshold
Definition ball_category.h:394
Definition ball_category.h:450
static void updateThresholdForHolders(Category *category)
Definition ball_category.h:657
static void enableRule(Category *category, int ruleIndex)
Definition ball_category.h:674
static void disableRule(Category *category, int ruleIndex)
Definition ball_category.h:689
static void setRuleThreshold(Category *category, int ruleThreshold)
Definition ball_category.h:666
static void linkCategoryHolder(Category *category, CategoryHolder *categoryHolder)
Definition ball_category.h:639
static void setRelevantRuleMask(Category *category, RuleSet::MaskType mask)
Definition ball_category.h:704
static void resetCategoryHolders(Category *category)
Definition ball_category.h:649
Definition ball_category.h:184
int maxLevel() const
Return the numerical maximum of the four levels of this category.
Definition ball_category.h:532
int triggerLevel() const
Return the trigger level of this category.
Definition ball_category.h:552
~Category()=default
Destroy this object.
int triggerAllLevel() const
Return the trigger-all level of this category.
Definition ball_category.h:559
const char * categoryName() const
Return the name of this category.
Definition ball_category.h:520
static bool areValidThresholdLevels(int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
Definition ball_category.h:507
BSLMF_NESTED_TRAIT_DECLARATION(Category, bslma::UsesBslmaAllocator)
RuleSet::MaskType relevantRuleMask() const
Definition ball_category.h:584
int ruleThreshold() const
Definition ball_category.h:578
Category(const bsl::string_view &categoryName, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel, bslma::Allocator *basicAllocator=0)
int recordLevel() const
Return the record level of this category.
Definition ball_category.h:538
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:566
int passLevel() const
Return the pass level of this category.
Definition ball_category.h:545
bool isEnabled(int level) const
Definition ball_category.h:526
int threshold() const
Definition ball_category.h:572
unsigned int MaskType
Definition ball_ruleset.h:158
static ThresholdAggregate unpack(unsigned packed)
Definition ball_thresholdaggregate.h:397
Definition ball_thresholdaggregate.h:101
int triggerLevel() const
Return the trigger level of this threshold aggregate.
Definition ball_thresholdaggregate.h:290
int recordLevel() const
Return the record level of this threshold aggregate.
Definition ball_thresholdaggregate.h:278
int passLevel() const
Return the pass level of this threshold aggregate.
Definition ball_thresholdaggregate.h:284
int triggerAllLevel() const
Return the trigger-all level of this threshold aggregate.
Definition ball_thresholdaggregate.h:296
Definition bslstl_stringview.h:471
Definition bslstl_string.h:1252
const CHAR_TYPE * c_str() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:7405
Definition bslma_allocator.h:545
Definition bslmt_lockguard.h:234
Definition bslmt_mutex.h:317
Definition bsls_atomic.h:744
int loadAcquire() const
Definition bsls_atomic.h:1753
void storeRelease(int value)
Definition bsls_atomic.h:1687
Definition bsls_atomic.h:1050
unsigned int testAndSwapAcqRel(unsigned int compareValue, unsigned int swapValue)
Definition bsls_atomic.h:2077
unsigned int loadAcquire() const
Definition bsls_atomic.h:2100
unsigned int loadRelaxed() const
Definition bsls_atomic.h:2106
void storeRelease(unsigned int value)
Definition bsls_atomic.h:2032
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:651
Definition ball_administration.h:214
static unsigned int withBitSet(unsigned int value, int index)
Definition bdlb_bitutil.h:595
static unsigned int withBitCleared(unsigned int value, int index)
Definition bdlb_bitutil.h:571
Definition bslma_usesbslmaallocator.h:344
Definition bsls_atomicoperations.h:836
static void * getPtrAcquire(AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations.h:2314
static void setIntRelaxed(AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations.h:1554
static int getIntRelaxed(AtomicTypes::Int const *atomicInt)
Definition bsls_atomicoperations.h:1536
static void setPtrRelease(AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations.h:2347