Public Member Functions | Private Attributes

ACE::INet::ConnectionCacheKey Class Reference

#include <ConnectionCache.h>

Collaboration diagram for ACE::INet::ConnectionCacheKey:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConnectionCacheKey ()
 ConnectionCacheKey (const ConnectionKey &key)
 ConnectionCacheKey (const ConnectionCacheKey &cachekey)
ConnectionCacheKeyoperator= (const ConnectionCacheKey &cachekey)
bool operator== (const ConnectionCacheKey &cachekey) const
bool operator!= (const ConnectionCacheKey &cachekey) const
u_long hash () const
const ConnectionKeykey () const

Private Attributes

ConnectionKeykey_
bool delete_key_

Detailed Description

Definition at line 53 of file ConnectionCache.h.


Constructor & Destructor Documentation

ACE::INet::ConnectionCacheKey::ConnectionCacheKey (  ) 

Definition at line 26 of file ConnectionCache.cpp.

      : key_ (0),
        delete_key_ (false)
      {
      }

ACE::INet::ConnectionCacheKey::ConnectionCacheKey ( const ConnectionKey key  ) 

Definition at line 32 of file ConnectionCache.cpp.

      : key_ (&const_cast<ConnectionKey&> (key)),
        delete_key_ (false)
      {
      }

ACE::INet::ConnectionCacheKey::ConnectionCacheKey ( const ConnectionCacheKey cachekey  ) 

Definition at line 38 of file ConnectionCache.cpp.

      : key_ (0),
        delete_key_ (false)
      {
        *this = cachekey;
      }


Member Function Documentation

u_long ACE::INet::ConnectionCacheKey::hash ( void   )  const

Definition at line 69 of file ConnectionCache.cpp.

      {
        return this->key_ ? this->key ().hash () : 0;
      }

const ConnectionKey & ACE::INet::ConnectionCacheKey::key ( void   )  const [inline]

Definition at line 37 of file ConnectionCache.inl.

      {
        return *this->key_;
      }

bool ACE::INet::ConnectionCacheKey::operator!= ( const ConnectionCacheKey cachekey  )  const [inline]

Definition at line 31 of file ConnectionCache.inl.

      {
        return !(*this == cachekey);
      }

ConnectionCacheKey & ACE::INet::ConnectionCacheKey::operator= ( const ConnectionCacheKey cachekey  ) 

Definition at line 45 of file ConnectionCache.cpp.

      {
        if (this != &cachekey)
          {
            if (this->key_ != 0 && this->delete_key_)
              {
                delete this->key_;
                this->delete_key_ = false;
              }

            this->key_ = cachekey.key_->duplicate ();

            if (this->key_ == 0)
              {
                this->delete_key_ = false;
              }
            else
              {
                this->delete_key_ = true;
              }
          }
        return *this;
      }

bool ACE::INet::ConnectionCacheKey::operator== ( const ConnectionCacheKey cachekey  )  const [inline]

Definition at line 25 of file ConnectionCache.inl.

      {
        return this->key_ ? (this->key () == cachekey.key ()) : !cachekey.key_;
      }


Member Data Documentation

Definition at line 72 of file ConnectionCache.h.

Definition at line 71 of file ConnectionCache.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines