ircproxy  The Ultimate Cyborg

NickData Class Reference

#include <Nick.h>

Inheritance diagram for NickData:

WhoEventType

List of all members.


Detailed Description

The data that can be associated with a nick name.

Definition at line 51 of file Nick.h.


Public Types

typedef std::map< std::string,
boost::weak_ptr< Channel > > 
common_channels_type
 The type of NickData::M_common_channels.

Public Member Functions

 NickData (void)
 Construct an uninitialized NickData object.
mask_type initialized (void) const
 Return a mask indicating which fields are initialized.
std::string const & username (void) const
 Retrieve the username field (must be initialized first).
std::string const & hostname (void) const
 Retrieve the hostname field (must be initialized first).
IPNumber const & ip (void) const
 Retrieve the IP field (must be initialized first).
std::string const & realname (void) const
 Retrieve the realname field (must be initialized first).
std::string const & servername (void) const
 Retrieve the servername field (must be initialized first).
int idletime (void) const
 Retrieve the idle time field (must be initialized first).
std::string const & accountname (void) const
 Retrieve the account field (must be initialized first).
int hopcount (void) const
 Retrieve the hopcount field (must be initialized first).
Flags const & flags (void) const
 Retrieve the flags field (must be initialized first).
void set_username (std::string const &username)
 Set the username field.
void set_hostname (std::string const &hostname)
 Set the hostname field.
void set_ip (IPNumber const &ip)
 Set the IP field.
void set_realname (std::string const &realname)
 Set the realname field.
void set_servername (std::string const &servername)
 Set the servername field.
void set_idletime (int idletime)
 Set the idletime field.
void set_accountname (std::string const &accountname)
 Set the accountname field.
void set_hopcount (int hopcount)
 Set the hopcount.
void set_flags (Flags const &flags)
 Set the flags.
void reset (void)
 Mark all data as uninitialized.
common_channels_typecommon_channels (void)
 Accessor for NickData::M_common_channels.
common_channels_type const & common_channels (void) const
 Accessor for NickData::M_common_channels.

Protected Attributes

mask_type M_initialized
 A bit mask indicating which of the data below has been retrieved before.
std::string M_username
 The username of this nick.
std::string M_hostname
 The hostname of this nick.
IPNumber M_ip
 The IP number of this nick.
std::string M_realname
 The real name info of this nick.
std::string M_servername
 The server name of this nick.
int M_idletime
 The idle time of this nick.
std::string M_accountname
 The account name of this nick.
int M_hopcount
 The hop count of this nick.
Flags M_flags
 The flags of this nick.
common_channels_type M_common_channels
 Map with common channels that this nick is on.

Member Typedef Documentation

typedef std::map<std::string, boost::weak_ptr<Channel> > NickData::common_channels_type

The type of NickData::M_common_channels.

Definition at line 53 of file Nick.h.


Constructor & Destructor Documentation

NickData::NickData ( void   )  [inline]

Construct an uninitialized NickData object.

Definition at line 70 of file Nick.h.

00070 : M_initialized(0) { }


Member Function Documentation

mask_type NickData::initialized ( void   )  const [inline]

Return a mask indicating which fields are initialized.

Definition at line 73 of file Nick.h.

References M_initialized.

Referenced by Nick::initialized(), Nick::is_initialized(), Nick::is_synced(), operator<<(), and Nick::synced().

00073 { return M_initialized; }

std::string const& NickData::username ( void   )  const [inline]

Retrieve the username field (must be initialized first).

Definition at line 75 of file Nick.h.

References ASSERT, M_initialized, M_username, and username_bit.

Referenced by operator<<().

std::string const& NickData::hostname ( void   )  const [inline]

Retrieve the hostname field (must be initialized first).

Definition at line 77 of file Nick.h.

References ASSERT, hostname_bit, M_hostname, and M_initialized.

Referenced by operator<<().

IPNumber const& NickData::ip ( void   )  const [inline]

Retrieve the IP field (must be initialized first).

Definition at line 79 of file Nick.h.

References ASSERT, ip_bit, M_initialized, and M_ip.

00079 { ASSERT(M_initialized & ip_bit); return M_ip; }

std::string const& NickData::realname ( void   )  const [inline]

Retrieve the realname field (must be initialized first).

Definition at line 81 of file Nick.h.

References ASSERT, M_initialized, M_realname, and realname_bit.

std::string const& NickData::servername ( void   )  const [inline]

Retrieve the servername field (must be initialized first).

Definition at line 83 of file Nick.h.

References ASSERT, M_initialized, M_servername, and servername_bit.

int NickData::idletime ( void   )  const [inline]

Retrieve the idle time field (must be initialized first).

Definition at line 85 of file Nick.h.

References ASSERT, idletime_bit, M_idletime, and M_initialized.

std::string const& NickData::accountname ( void   )  const [inline]

Retrieve the account field (must be initialized first).

Definition at line 87 of file Nick.h.

References accountname_bit, ASSERT, M_accountname, and M_initialized.

int NickData::hopcount ( void   )  const [inline]

Retrieve the hopcount field (must be initialized first).

Definition at line 89 of file Nick.h.

References ASSERT, hopcount_bit, M_hopcount, and M_initialized.

Flags const& NickData::flags ( void   )  const [inline]

Retrieve the flags field (must be initialized first).

Definition at line 91 of file Nick.h.

References ASSERT, flags_bit, M_flags, and M_initialized.

00091 { ASSERT(M_initialized & flags_bit); return M_flags; }

void NickData::set_username ( std::string const &  username  )  [inline]

Set the username field.

Definition at line 94 of file Nick.h.

References M_initialized, M_username, and username_bit.

void NickData::set_hostname ( std::string const &  hostname  )  [inline]

Set the hostname field.

Definition at line 96 of file Nick.h.

References hostname_bit, M_hostname, and M_initialized.

void NickData::set_ip ( IPNumber const &  ip  )  [inline]

Set the IP field.

Definition at line 98 of file Nick.h.

References ip_bit, M_initialized, and M_ip.

00098 { M_initialized |= ip_bit; M_ip = ip; }

void NickData::set_realname ( std::string const &  realname  )  [inline]

Set the realname field.

Definition at line 100 of file Nick.h.

References M_initialized, M_realname, and realname_bit.

void NickData::set_servername ( std::string const &  servername  )  [inline]

Set the servername field.

Definition at line 102 of file Nick.h.

References M_initialized, M_servername, and servername_bit.

void NickData::set_idletime ( int  idletime  )  [inline]

Set the idletime field.

Definition at line 104 of file Nick.h.

References idletime_bit, M_idletime, and M_initialized.

void NickData::set_accountname ( std::string const &  accountname  )  [inline]

Set the accountname field.

Definition at line 106 of file Nick.h.

References accountname_bit, M_accountname, and M_initialized.

void NickData::set_hopcount ( int  hopcount  )  [inline]

Set the hopcount.

Definition at line 108 of file Nick.h.

References hopcount_bit, M_hopcount, and M_initialized.

void NickData::set_flags ( Flags const &  flags  )  [inline]

Set the flags.

Definition at line 110 of file Nick.h.

References flags_bit, M_flags, and M_initialized.

void NickData::reset ( void   )  [inline]

Mark all data as uninitialized.

Definition at line 113 of file Nick.h.

References M_initialized.

00113 { M_initialized = 0; }

common_channels_type& NickData::common_channels ( void   )  [inline]

Accessor for NickData::M_common_channels.

Definition at line 116 of file Nick.h.

References M_common_channels.

Referenced by Nick::add_channel(), Nick::serverside_nick_changed_to(), and Nick::sub_channel().

00116 { return M_common_channels; }

common_channels_type const& NickData::common_channels ( void   )  const [inline]

Accessor for NickData::M_common_channels.

Definition at line 119 of file Nick.h.

References M_common_channels.

00119 { return M_common_channels; }


Member Data Documentation

std::string NickData::M_username [protected]

The username of this nick.

Definition at line 57 of file Nick.h.

Referenced by set_username(), and username().

std::string NickData::M_hostname [protected]

The hostname of this nick.

Definition at line 58 of file Nick.h.

Referenced by hostname(), and set_hostname().

IPNumber NickData::M_ip [protected]

The IP number of this nick.

Definition at line 59 of file Nick.h.

Referenced by ip(), and set_ip().

std::string NickData::M_realname [protected]

The real name info of this nick.

Definition at line 60 of file Nick.h.

Referenced by realname(), and set_realname().

std::string NickData::M_servername [protected]

The server name of this nick.

Definition at line 61 of file Nick.h.

Referenced by servername(), and set_servername().

int NickData::M_idletime [protected]

The idle time of this nick.

Definition at line 62 of file Nick.h.

Referenced by idletime(), and set_idletime().

std::string NickData::M_accountname [protected]

The account name of this nick.

Definition at line 63 of file Nick.h.

Referenced by accountname(), and set_accountname().

int NickData::M_hopcount [protected]

The hop count of this nick.

Definition at line 64 of file Nick.h.

Referenced by hopcount(), and set_hopcount().

Flags NickData::M_flags [protected]

The flags of this nick.

Definition at line 65 of file Nick.h.

Referenced by flags(), and set_flags().

Map with common channels that this nick is on.

Definition at line 66 of file Nick.h.

Referenced by common_channels().


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

Copyright © 2005-2007 Carlo Wood.  All rights reserved.