blob: c0138c527cbdea187ca5628b7e6e770635198f2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
// $Id$
// ===============================================================================================
//
// = FILE
// CosProperty_Hash.cpp
//
// = Description
// Defines equal and hash functions for the Hash_Property_Map class.
//
// = Author
// Alexander Babu Arulanthu <alex@cs.wustl.edu>
//
// ================================================================================================
#include "CosProperty_Hash.h"
CosProperty_Hash_Key::CosProperty_Hash_Key (void)
{
}
CosProperty_Hash_Key::CosProperty_Hash_Key (const char * &name)
{
pname_ = CORBA::string_dup (name);
}
CosProperty_Hash_Key::CosProperty_Hash_Key (const CosPropertyService::PropertyName &name)
: pname_ (CORBA::string_dup (name))
{
}
CosProperty_Hash_Key::CosProperty_Hash_Key (const CosProperty_Hash_Key &src)
: pname_ (src.pname_)
{
}
int
CosProperty_Hash_Key::operator == (const CosProperty_Hash_Key &hash_key) const
{
ACE_DEBUG ((LM_DEBUG,
"CosProperty_Hash_Key::operator == : %s == %s \n",
this->pname_.in (),
hash_key.pname_.in ()));
return ACE_OS::strcmp (this->pname_.in (),
hash_key.pname_.in ()) == 0;
}
u_long
CosProperty_Hash_Key::hash (void) const
{
u_long ret = ACE::hash_pjw (this->pname_.in ());
ACE_DEBUG ((LM_DEBUG,
"CosProperty_Hash_Key::hash : hashing %s : val : %d \n",
this->pname_.in (),
ret));
return ret;
}
CosProperty_Hash_Key::~CosProperty_Hash_Key (void)
{
}
CosProperty_Hash_Value::CosProperty_Hash_Value (void)
{
}
#if 0
CosProperty_Hash_Value::CosProperty_Hash_Value (const CORBA::Any &any)
: pvalue_ (new CORBA::Any (any))
{
}
#endif /* 0 */
CosProperty_Hash_Value::CosProperty_Hash_Value (const CORBA::Any &any,
const CosPropertyService::PropertyModeType &mode)
: pvalue_ (new CORBA::Any (any)),
pmode_ (mode)
{
}
CosProperty_Hash_Value::CosProperty_Hash_Value (const CosProperty_Hash_Value &src)
: pvalue_ (src.pvalue_),
pmode_ (src.pmode_)
{
}
CosProperty_Hash_Value::~CosProperty_Hash_Value (void)
{
}
|