[#BloombergLP-ball-Category] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::Category :relfileprefix: ../../ :mrdocs: This class provides a container for a category name and threshold levels. == Synopsis Declared in `<ball_category.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Category; ---- == Description Instances of `Category` are created and manipulated by `CategoryManager`. All threshold levels are integral values in the range `[0 .. 255]`. Implementation Note: The `d_ruleThreshold` and `d_relevantRuleMask` serve as a cache for logging rule evaluation (see `ball_attributecontext`). They are not meant to be modified by users of the logging system, and may be modified by `const` operations of the logging system. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/Category/2constructor.adoc[`Category`] [.small]#[constructor]# | Create a category having the specified name and threshold levels. | xref:BloombergLP/ball/Category/categoryName.adoc[`categoryName`] | Return the name of this category. | xref:BloombergLP/ball/Category/isEnabled.adoc[`isEnabled`] | Return `true` if logging at the specified `level` is enabled for this category, and `false` otherwise. | xref:BloombergLP/ball/Category/maxLevel.adoc[`maxLevel`] | Return the numerical maximum of the four levels of this category. | xref:BloombergLP/ball/Category/passLevel.adoc[`passLevel`] | Return the pass level of this category. | xref:BloombergLP/ball/Category/recordLevel.adoc[`recordLevel`] | Return the record level of this category. | xref:BloombergLP/ball/Category/relevantRuleMask.adoc[`relevantRuleMask`] | Return a reference to the non‐modifiable relevant rule mask for this category. | xref:BloombergLP/ball/Category/ruleThreshold.adoc[`ruleThreshold`] | Return the maximum threshold for any rule associated with this category. | xref:BloombergLP/ball/Category/setLevels.adoc[`setLevels`] | Set the threshold levels of this category if they are valid. | xref:BloombergLP/ball/Category/threshold.adoc[`threshold`] | Return the current maximum threshold among this category's levels. | xref:BloombergLP/ball/Category/thresholdLevels.adoc[`thresholdLevels`] | Return the aggregate threshold levels of this category. | xref:BloombergLP/ball/Category/triggerAllLevel.adoc[`triggerAllLevel`] | Return the trigger‐all level of this category. | xref:BloombergLP/ball/Category/triggerLevel.adoc[`triggerLevel`] | Return the trigger level of this category. | xref:BloombergLP/ball/Category/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<Category, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/Category/areValidThresholdLevels.adoc[`areValidThresholdLevels`] | Return `true` if each of the specified `recordLevel`, `passLevel`, `triggerLevel` and `triggerAllLevel` threshold values are in the range `[0 .. 255]`, and `false` otherwise. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/ball/CategoryManagerImpUtil.adoc[BloombergLP::ball::CategoryManagerImpUtil]` | This class provides a suite of free functions used to help implement a manager of categories and category holders. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#