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.

References mmdevice_.

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

MMDevice_Map_Hash_Key::MMDevice_Map_Hash_Key ( AVStreams::MMDevice_ptr  mmdevice  ) 

constructor.

Definition at line 326 of file AVStreams_i.cpp.

References mmdevice_.

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

MMDevice_Map_Hash_Key::MMDevice_Map_Hash_Key ( const MMDevice_Map_Hash_Key  ) 

copy constructor.

Definition at line 332 of file AVStreams_i.cpp.

References mmdevice_.

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

MMDevice_Map_Hash_Key::~MMDevice_Map_Hash_Key ( void   ) 

destructor.

Definition at line 338 of file AVStreams_i.cpp.

References CORBA::release().

00339 {
00340   CORBA::release (this->mmdevice_);
00341 }


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.

References CORBA::Exception::_tao_print_exception(), and mmdevice_.

00389 {
00390   u_long result = 0;
00391   try
00392     {
00393       result = this->mmdevice_->_hash (this->hash_maximum_);
00394     }
00395   catch (const CORBA::Exception& ex)
00396     {
00397       ex._tao_print_exception ("MMDevice_Map_Hash_Key::hash");
00398       return 0;
00399     }
00400   return result;
00401 }

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.

References CORBA::Exception::_tao_print_exception(), and mmdevice_.

00345 {
00346   CORBA::Boolean result = 0;
00347   try
00348     {
00349       result =
00350         this->mmdevice_->_is_equivalent (hash_key.mmdevice_);
00351     }
00352   catch (const CORBA::Exception& ex)
00353     {
00354       ex._tao_print_exception (
00355         "MMDevice_Map_Hash_Key::operator == ");
00356       return false;
00357     }
00358 
00359   return result;
00360 }


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.

00365 {
00366   bool result = false;
00367 
00368   try
00369     {
00370       const CORBA::ULong left_hash =
00371         left.mmdevice_->_hash (left.hash_maximum_);
00372 
00373       const CORBA::ULong right_hash =
00374         right.mmdevice_->_hash (right.hash_maximum_);
00375 
00376       result = left_hash < right_hash;
00377     }
00378   catch (const CORBA::Exception& ex)
00379     {
00380       ex._tao_print_exception ("operator < for MMDevice_Map_Hash_Key");
00381       return false;
00382     }
00383 
00384   return result;
00385 }


Member Data Documentation

const int MMDevice_Map_Hash_Key::hash_maximum_ = 10000 [static]

Definition at line 183 of file AVStreams_i.h.

Referenced by operator<().

AVStreams::MMDevice_ptr MMDevice_Map_Hash_Key::mmdevice_ [protected]

Definition at line 185 of file AVStreams_i.h.

Referenced by hash(), MMDevice_Map_Hash_Key(), operator<(), and operator==().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:47:57 2010 for TAO_AV by  doxygen 1.4.7