XMPPDirVal Class Reference
Direction flags.
More...
#include <xmpputils.h>
List of all members.
Public Types |
| enum | Direction { None = 0,
To = 1,
From = 2,
Both = 3
} |
Public Member Functions |
| | XMPPDirVal (int flags=None) |
| | XMPPDirVal (const char *name) |
| void | replace (int flag) |
| void | replace (const char *name) |
| void | set (int flag) |
| void | reset (int flag) |
| bool | flag (int mask) const |
| bool | to () const |
| bool | from () const |
| | operator int () |
Static Public Member Functions |
| static const char * | lookup (int flag, const char *defVal="") |
| static int | lookup (const char *name, int defVal=None) |
Static Public Attributes |
| static TokenDict | s_names [] |
Detailed Description
Direction flags.
This class holds a 4-state direction value (such as subscription states)
Constructor & Destructor Documentation
Constructor
- Parameters:
-
| name | The name of the flag used to initialize this object |
References TelEngine::lookup().
Member Function Documentation
| bool flag |
( |
int |
mask |
) |
const [inline] |
Check if a given bit mask is set
- Parameters:
-
- Returns:
- True if the given bit mask is set
| bool from |
( |
|
) |
const [inline] |
Check if the 'From' flag is set
- Returns:
- True if the 'From' flag is set
| static int lookup |
( |
const char * |
name, |
|
|
int |
defVal = None | |
|
) |
| | [inline, static] |
Get the value associated with a flag name
- Parameters:
-
| name | The flag name |
| defVal | Value to return if not found |
- Returns:
- The value of the requested flag name
References TelEngine::lookup().
| static const char* lookup |
( |
int |
flag, |
|
|
const char * |
defVal = "" | |
|
) |
| | [inline, static] |
Get the name of a flag
- Parameters:
-
| flag | The flag |
| defVal | Value to return if not found |
- Returns:
- The name of the requested flag
References TelEngine::lookup().
| operator int |
( |
|
) |
[inline] |
| void replace |
( |
const char * |
name |
) |
[inline] |
Replace all flags from a value's name
- Parameters:
-
| name | The name of the flag used to replace this value |
References TelEngine::lookup().
| void replace |
( |
int |
flag |
) |
[inline] |
Replace all flags
- Parameters:
-
| flag | The new value of the flags |
| void reset |
( |
int |
flag |
) |
[inline] |
Reset one or more flags
- Parameters:
-
| void set |
( |
int |
flag |
) |
[inline] |
Set one or more flags
- Parameters:
-
| bool to |
( |
|
) |
const [inline] |
Check if the 'To' flag is set
- Returns:
- True if the 'To' flag is set
Member Data Documentation
The documentation for this class was generated from the following file: