Public Member Functions | Static Public Attributes | Protected Attributes | Friends

MMDevice_Map_Hash_Key Class Reference

#include <AVStreams_i.h>

List of all members.

Public Member Functions

 MMDevice_Map_Hash_Key (void)
 default constructor.
 MMDevice_Map_Hash_Key (AVStreams::MMDevice_ptr mmdevice)
 constructor.
 MMDevice_Map_Hash_Key (const MMDevice_Map_Hash_Key &)
 copy constructor.
 ~MMDevice_Map_Hash_Key (void)
 destructor.
bool operator== (const MMDevice_Map_Hash_Key &hash_key) const
 operator== needed by ACE_Hash_Map_Manager.
u_long hash (void) const
 hash function for this mmdevice.

Static Public Attributes

static const int hash_maximum_ = 10000

Protected Attributes

AVStreams::MMDevice_ptr mmdevice_

Friends

bool operator< (const MMDevice_Map_Hash_Key &left, const MMDevice_Map_Hash_Key &right)
 operator== needed by ACE_Hash_Map_Manager.

Detailed Description

Definition at line 158 of file AVStreams_i.h.


Constructor & Destructor Documentation

MMDevice_Map_Hash_Key::MMDevice_Map_Hash_Key ( void   ) 

default constructor.

Definition at line 320 of file AVStreams_i.cpp.

{
  this->mmdevice_ = AVStreams::MMDevice::_nil ();
}

MMDevice_Map_Hash_Key::MMDevice_Map_Hash_Key ( AVStreams::MMDevice_ptr  mmdevice  ) 

constructor.

Definition at line 326 of file AVStreams_i.cpp.

{
  this->mmdevice_ = AVStreams::MMDevice::_duplicate (mmdevice);
}

MMDevice_Map_Hash_Key::MMDevice_Map_Hash_Key ( const MMDevice_Map_Hash_Key hash_key  ) 

copy constructor.

Definition at line 332 of file AVStreams_i.cpp.

{
  this->mmdevice_ = AVStreams::MMDevice::_duplicate (hash_key.mmdevice_);
}

MMDevice_Map_Hash_Key::~MMDevice_Map_Hash_Key ( void   ) 

destructor.

Definition at line 338 of file AVStreams_i.cpp.


Member Function Documentation

u_long MMDevice_Map_Hash_Key::hash ( void   )  const

hash function for this mmdevice.

Definition at line 388 of file AVStreams_i.cpp.

{
  u_long result = 0;
  try
    {
      result = this->mmdevice_->_hash (this->hash_maximum_);
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("MMDevice_Map_Hash_Key::hash");
      return 0;
    }
  return result;
}

bool MMDevice_Map_Hash_Key::operator== ( const MMDevice_Map_Hash_Key hash_key  )  const

operator== needed by ACE_Hash_Map_Manager.

Definition at line 344 of file AVStreams_i.cpp.

{
  CORBA::Boolean result = 0;
  try
    {
      result =
        this->mmdevice_->_is_equivalent (hash_key.mmdevice_);
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception (
        "MMDevice_Map_Hash_Key::operator == ");
      return false;
    }

  return result;
}


Friends And Related Function Documentation

bool operator< ( const MMDevice_Map_Hash_Key left,
const MMDevice_Map_Hash_Key right 
) [friend]

operator== needed by ACE_Hash_Map_Manager.

Definition at line 363 of file AVStreams_i.cpp.

{
  bool result = false;

  try
    {
      const CORBA::ULong left_hash =
        left.mmdevice_->_hash (left.hash_maximum_);

      const CORBA::ULong right_hash =
        right.mmdevice_->_hash (right.hash_maximum_);

      result = left_hash < right_hash;
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("operator < for MMDevice_Map_Hash_Key");
      return false;
    }

  return result;
}


Member Data Documentation

const int MMDevice_Map_Hash_Key::hash_maximum_ = 10000 [static]

Definition at line 183 of file AVStreams_i.h.

AVStreams::MMDevice_ptr MMDevice_Map_Hash_Key::mmdevice_ [protected]

Definition at line 185 of file AVStreams_i.h.


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