Yate: Flags32 Class Reference

Yate

Public Member Functions | Protected Attributes | List of all members
Flags32 Class Reference

A 32 bit length list of flags. More...

`#include <yatecbase.h>`

## Public Member Functions
| Flags32 ()
| Flags32 (u_int32_t value)
u_int32_t | flags () const
void | set (u_int32_t mask)
void | reset (u_int32_t mask)
u_int32_t | flag (u_int32_t mask) const
void | changeFlag (u_int32_t mask, bool on)
bool | changeFlagCheck (u_int32_t mask, bool ok)
void | change (u_int32_t value)
| operator u_int32_t () const
const Flags32 & | operator= (int value)

## Protected Attributes
u_int32_t | m_flags

## Detailed Description

A 32 bit length list of flags.

This class keeps a 32bit length flag mask

## Constructor & Destructor Documentation

## ◆ Flags32() [1/2]

Flags32 | ( |  | ) |
| inline

Constructor

Referenced by operator=().

## ◆ Flags32() [2/2]

Flags32 | ( | u_int32_t | value | ) |
| inline

Constructor

Parameters

  value | Flags value

## Member Function Documentation

## ◆ change()

void change | ( | u_int32_t | value | ) |
| inline

Change flags

Parameters

  value | New flags value

## ◆ changeFlag()

void changeFlag | ( | u_int32_t | mask,
|  | bool | on )
| inline

Set or reset flags

Parameters

  mask | Flag(s)
  on | True to set, false to reset

References reset(), and set().

Referenced by changeFlagCheck().

## ◆ changeFlagCheck()

bool changeFlagCheck | ( | u_int32_t | mask,
|  | bool | ok )
| inline

Set or reset flags, check if changed

Parameters

  mask | Flag(s)
  ok | True to set, false to reset

Returns
  True if any flag contained in mask changed

References changeFlag(), and flag().

## ◆ flag()

u_int32_t flag | ( | u_int32_t | mask | ) | const
| inline

Check if a mask of flags is set

Parameters

  mask | Flag(s) to check

Returns
  The flags of mask which are set, 0 if no mask flag is set

Referenced by changeFlagCheck().

## ◆ flags()

u_int32_t flags | ( |  | ) | const
| inline

Retrieve flags value

Returns
  The flags

## ◆ operator u_int32_t()

operator u_int32_t | ( |  | ) | const
| inline

Conversion to u_int32_t operator

## ◆ operator=()

const Flags32 & operator= | ( | int | value | ) |
| inline

Asignement from int operator

References Flags32().

## ◆ reset()

void reset | ( | u_int32_t | mask | ) |
| inline

Reset flags

Parameters

  mask | Flag(s) to reset

Referenced by changeFlag().

## ◆ set()

void set | ( | u_int32_t | mask | ) |
| inline

Set flags

Parameters

  mask | Flag(s) to set

Referenced by changeFlag().

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

- yatecbase.h