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 Flags32operator= (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 ( )
inline

Constructor

Flags32 ( u_int32_t  value)
inline

Constructor

Parameters
valueFlags value

Member Function Documentation

void change ( u_int32_t  value)
inline

Change flags

Parameters
valueNew flags value
void changeFlag ( u_int32_t  mask,
bool  on 
)
inline

Set or reset flags

Parameters
maskFlag(s)
onTrue to set, false to reset

References Flags32::reset(), and Flags32::set().

Referenced by Flags32::changeFlagCheck().

bool changeFlagCheck ( u_int32_t  mask,
bool  ok 
)
inline

Set or reset flags, check if changed

Parameters
maskFlag(s)
okTrue to set, false to reset
Returns
True if any flag contained in mask changed

References Flags32::changeFlag(), and Flags32::flag().

Referenced by ClientResource::setAudio(), and ClientResource::setFileTransfer().

u_int32_t flag ( u_int32_t  mask) const
inline

Check if a mask of flags is set

Parameters
maskFlag(s) to check
Returns
The flags of mask which are set, 0 if no mask flag is set

Referenced by Flags32::changeFlagCheck(), ClientContact::subscriptionFrom(), and ClientContact::subscriptionTo().

u_int32_t flags ( ) const
inline

Retrieve flags value

Returns
The flags
operator u_int32_t ( ) const
inline

Conversion to u_int32_t operator

const Flags32& operator= ( int  value)
inline

Asignement from int operator

void reset ( u_int32_t  mask)
inline

Reset flags

Parameters
maskFlag(s) to reset

Referenced by Flags32::changeFlag().

void set ( u_int32_t  mask)
inline

Set flags

Parameters
maskFlag(s) to set

Referenced by Flags32::changeFlag().


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