BDE 4.14.0 Production release
Loading...
Searching...
No Matches
ball::CategoryHolder Class Reference

#include <ball_category.h>

Public Types

enum  { e_UNINITIALIZED_CATEGORY = 256 , e_DYNAMIC_CATEGORY = 257 }
 

Public Member Functions

void reset ()
 
void setCategory (const Category *category)
 
void setThreshold (int threshold)
 
void setNext (CategoryHolder *holder)
 Set this holder to point to the specified holder.
 
const Categorycategory () const
 
int threshold () const
 Return the threshold level held by this holder.
 
CategoryHoldernext () const
 Return the address of the modifiable holder held by this holder.
 

Public Attributes

AtomicInt d_threshold
 
AtomicPointer d_category_p
 
AtomicPointer d_next_p
 

Detailed Description

This class, informally referred to as a "category holder" (or simply "holder"), holds a category, a threshold level, and a pointer to a "next" holder. Both the category and next pointer may be null. The intended use is as follows: (1) instances of this class are (only) declared in contexts where logging occurs; (2) if the held category is non-null, then the held threshold is the numerical maximum of the four levels of that category; (3) if the next pointer is non-null, then the holder pointed to holds the same category and threshold. Instances of this class must be statically initializable. Hence, the data members are public, and automatically generated constructors and destructor are used.

This class should not be used directly by client code. It is an implementation detail of the ball logging system.

See ball_category

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

This enumeration defines distinguished values for category holder threshold levels. Note that these values are intentionally outside the range [0 .. 255].

Enumerator
e_UNINITIALIZED_CATEGORY 
e_DYNAMIC_CATEGORY 

Member Function Documentation

◆ category()

const Category * ball::CategoryHolder::category ( ) const
inline

Return the address of the non-modifiable category held by this holder.

◆ next()

CategoryHolder * ball::CategoryHolder::next ( ) const
inline

◆ reset()

void ball::CategoryHolder::reset ( )

Reset this object to its default value. The default value is:

@ e_UNINITIALIZED_CATEGORY
Definition ball_category.h:379

◆ setCategory()

void ball::CategoryHolder::setCategory ( const Category category)
inline

Set the address of the category held by this holder to the specified category.

◆ setNext()

void ball::CategoryHolder::setNext ( CategoryHolder holder)
inline

◆ setThreshold()

void ball::CategoryHolder::setThreshold ( int  threshold)
inline

Set the threshold level held by this holder to the specified threshold.

◆ threshold()

int ball::CategoryHolder::threshold ( ) const
inline

Member Data Documentation

◆ d_category_p

AtomicPointer ball::CategoryHolder::d_category_p

◆ d_next_p

AtomicPointer ball::CategoryHolder::d_next_p

◆ d_threshold

AtomicInt ball::CategoryHolder::d_threshold

The documentation for this class was generated from the following file: