ircproxy  The Ultimate Cyborg

IdentityReference Class Reference

#include <IdentityReference.h>

Inheritance diagram for IdentityReference:

Authentication Channel ClientSession ServerConnection ServerSession

List of all members.


Detailed Description

Base class for classes that always are related to exactly one Identity.

Definition at line 22 of file IdentityReference.h.


Public Member Functions

Identity const & identity (void) const
 Returns a const reference to the underlying identity.
Identityidentity (void)
 Returns a reference to the underlying identity.
bool has_identity (void) const
 Returns true when this object is associated with an Identity.

Protected Member Functions

 IdentityReference (void)
 Default constructor.
 IdentityReference (Identity *identity)
 Construct an IdentityReference instance for identity identity.
void set_identity (Identity *identity)
 Initialize the underlying Identity pointer.

Private Attributes

IdentityM_identity
 Pointer to the identity that this session is related to.

Constructor & Destructor Documentation

IdentityReference::IdentityReference ( void   )  [inline, protected]

Default constructor.

Definition at line 28 of file IdentityReference.h.

00028 : M_identity(NULL) { }

IdentityReference::IdentityReference ( Identity identity  )  [inline, protected]

Construct an IdentityReference instance for identity identity.

Definition at line 30 of file IdentityReference.h.

00030 : M_identity(identity) { }


Member Function Documentation

void IdentityReference::set_identity ( Identity identity  )  [inline, protected]

Initialize the underlying Identity pointer.

Definition at line 33 of file IdentityReference.h.

References ASSERT, and M_identity.

Referenced by ClientSession::new_message_received().

00033 { ASSERT(!M_identity); M_identity = identity; }

Identity& IdentityReference::identity ( void   )  [inline]

Returns a reference to the underlying identity.

Definition at line 40 of file IdentityReference.h.

References M_identity.

00040 { return *M_identity; }

bool IdentityReference::has_identity ( void   )  const [inline]

Returns true when this object is associated with an Identity.

Definition at line 43 of file IdentityReference.h.

References M_identity.

Referenced by ClientSession::new_message_received(), operator<<(), and ClientSession::~ClientSession().

00043 { return M_identity; }


Member Data Documentation

Pointer to the identity that this session is related to.

Definition at line 24 of file IdentityReference.h.

Referenced by has_identity(), identity(), and set_identity().


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

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