ircproxy The Ultimate Cyborg |
#include <Flags.h>
Definition at line 26 of file Flags.h.
Public Member Functions | |
Flags (void) | |
Construct an uninitialized Flags object. | |
Flags (Network const &network, std::string const &who_flags) | |
Construct an initialized Flags object for network network and string who_flags. | |
Flags (Flags const &flags) | |
Copy constructor. | |
Flags & | operator= (Flags const &flags) |
Assignment operator. | |
void | assign (Network const &network, std::string const &who_flags) |
(Re)initialize this object for network network and string who_flags. | |
Flags & | operator= (std::string const &who_flags) |
Reassign who_flags to this object without changing the network. | |
bool | is_initialized (void) const |
Returns true if this object is initialized. | |
Private Attributes | |
unsigned int | M_flags |
A mask for the user mode flags. | |
Network const * | M_network |
A pointer to the corresponding network, or NULL when this object is not initialized. |
Flags::Flags | ( | void | ) | [inline] |
Flags::Flags | ( | Network const & | network, | |
std::string const & | who_flags | |||
) | [inline] |
Flags::Flags | ( | Flags const & | flags | ) | [inline] |
void Flags::assign | ( | Network const & | network, | |
std::string const & | who_flags | |||
) |
(Re)initialize this object for network network and string who_flags.
Definition at line 79 of file Flags.cc.
References Network::char_to_flag(), M_flags, and M_network.
Referenced by Flags(), and operator=().
00080 { 00081 M_flags = 0; 00082 M_network = &network; 00083 for (std::string::const_iterator iter = who_flags.begin(); iter != who_flags.end(); ++iter) 00084 M_flags |= network.char_to_flag(*iter); 00085 }
Flags& Flags::operator= | ( | std::string const & | who_flags | ) | [inline] |
Reassign who_flags to this object without changing the network.
Definition at line 45 of file Flags.h.
References ASSERT, assign(), is_initialized(), and M_network.
00045 { ASSERT(is_initialized()); assign(*M_network, who_flags); return *this; }
bool Flags::is_initialized | ( | void | ) | const [inline] |
Returns true if this object is initialized.
Definition at line 48 of file Flags.h.
References M_network.
Referenced by operator=().
00048 { return M_network; }
unsigned int Flags::M_flags [private] |
A mask for the user mode flags.
Definition at line 28 of file Flags.h.
Referenced by assign(), and operator=().
Network const* Flags::M_network [private] |
A pointer to the corresponding network, or NULL when this object is not initialized.
Definition at line 29 of file Flags.h.
Referenced by assign(), is_initialized(), and operator=().
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|