|
|
This class holds a 4-state direction value (such as subscription states)
enum Direction { None = 0, To = 1, From = 2, Both = 3, } | Direction |
inline XMPPDirVal (int flags = None)
| XMPPDirVal |
Constructor
Parameters:
flags | Flag(s) to set |
inline XMPPDirVal (const char* name)
| XMPPDirVal |
Constructor
Parameters:
name | The name of the flag used to initialize this object |
inline void replace (int flag)
| replace |
Replace all flags
Parameters:
flag | The new value of the flags |
inline void replace (const char* name)
| replace |
Replace all flags from a value's name
Parameters:
name | The name of the flag used to replace this value |
inline void set (int flag)
| set |
Set one or more flags
Parameters:
flag | Flag(s) to set |
inline void reset (int flag)
| reset |
Reset one or more flags
Parameters:
flag | Flag(s) to reset |
inline bool flag (int mask)
| flag |
[const]
Check if a given bit mask is set
Parameters:
mask | Bit mask to check |
Returns: True if the given bit mask is set
inline bool to ()
| to |
[const]
Check if the 'To' flag is set
Returns: True if the 'To' flag is set
inline bool from ()
| from |
[const]
Check if the 'From' flag is set
Returns: True if the 'From' flag is set
inline operator int ()
| int |
Cast operator
inline const char* lookup (int flag, const char* defVal = "")
| lookup |
[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
inline int lookup (const char* name, int defVal = None)
| lookup |
[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
static TokenDict s_names[] | s_names[] |
Generated by: paulc on bussard on Wed Oct 21 01:57:30 2009, using kdoc 2.0a54. |