ircproxy  The Ultimate Cyborg

WhoRequest Class Reference

#include <WhoRequest.h>

List of all members.


Detailed Description

A WHO request.

Definition at line 129 of file WhoRequest.h.


Public Member Functions

 WhoRequest (ClientSession &client_session, std::string const &mask)
 Construct a WhoRequest for WHO <mask>.
 WhoRequest (ClientSession &client_session, std::string const &mask, std::string options)
 Construct a WhoRequest for WHO <mask> <options> or WHO <dummy> <options> :<mask>.
std::string const & mask (void) const
 Accessor for the mask.
WhoOptions const & options (void) const
 Accessor for the options.
bool mask_contains_space (void) const
 Return true if the mask contains a space.
bool mask_is_target (void) const
 Return true if the mask is a known target.
boost::shared_ptr< Target > const & mask_target (void) const
 Return the target that the mask contains.

Private Attributes

std::string M_mask
 The first or third parameter of the WHO request.
WhoOptions M_options
 The options of the WHO request.
bool M_mask_contains_space
 True if M_mask contains a space.
bool M_mask_is_target
 True if M_mask is a known target and M_target is valid.
boost::shared_ptr< TargetM_target
 The target that M_mask refers to. Only valid if M_mask_is_target is true.

Constructor & Destructor Documentation

WhoRequest::WhoRequest ( ClientSession client_session,
std::string const &  mask 
) [inline]

Construct a WhoRequest for WHO <mask>.

Definition at line 142 of file WhoRequest.h.

00142 : M_mask(mask) { decode_mask(client_session); }

WhoRequest::WhoRequest ( ClientSession client_session,
std::string const &  mask,
std::string  options 
) [inline]

Construct a WhoRequest for WHO <mask> <options> or WHO <dummy> <options> :<mask>.

Definition at line 144 of file WhoRequest.h.

00144 : M_mask(mask), M_options(options) { decode_mask(client_session); }


Member Function Documentation

std::string const& WhoRequest::mask ( void   )  const [inline]

Accessor for the mask.

Definition at line 147 of file WhoRequest.h.

References M_mask.

Referenced by Identity::new_server_message_received(), operator<<(), and ServerSession::send_who_write_event().

00147 { return M_mask; }

WhoOptions const& WhoRequest::options ( void   )  const [inline]

Accessor for the options.

Definition at line 149 of file WhoRequest.h.

References M_options.

Referenced by Identity::new_server_message_received(), operator<<(), and ServerSession::send_who_write_event().

00149 { return M_options; }

bool WhoRequest::mask_contains_space ( void   )  const [inline]

Return true if the mask contains a space.

Definition at line 151 of file WhoRequest.h.

References M_mask_contains_space.

Referenced by ServerSession::send_who_write_event().

00151 { return M_mask_contains_space; }

bool WhoRequest::mask_is_target ( void   )  const [inline]

Return true if the mask is a known target.

Definition at line 153 of file WhoRequest.h.

References M_mask_is_target.

Referenced by ServerSession::send_who_write_event().

00153 { return M_mask_is_target; }

boost::shared_ptr<Target> const& WhoRequest::mask_target ( void   )  const [inline]

Return the target that the mask contains.

Definition at line 155 of file WhoRequest.h.

References ASSERT, M_mask_is_target, and M_target.

Referenced by ServerSession::send_who_write_event().

00155 { ASSERT(M_mask_is_target); return M_target; }


Member Data Documentation

std::string WhoRequest::M_mask [private]

The first or third parameter of the WHO request.

Definition at line 131 of file WhoRequest.h.

Referenced by mask().

The options of the WHO request.

Definition at line 132 of file WhoRequest.h.

Referenced by options().

True if M_mask contains a space.

Definition at line 133 of file WhoRequest.h.

Referenced by mask_contains_space().

True if M_mask is a known target and M_target is valid.

Definition at line 134 of file WhoRequest.h.

Referenced by mask_is_target(), and mask_target().

boost::shared_ptr<Target> WhoRequest::M_target [private]

The target that M_mask refers to. Only valid if M_mask_is_target is true.

Definition at line 135 of file WhoRequest.h.

Referenced by mask_target().


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

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