blob: 892404f0b519c5355c3e5589fe2ee15a3a3b1d8c (
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
|
/* -*- C++ -*- */
//$Id$
// ===================================================================================================
//
// = FILE
// CosProperty_Hash.h
//
// = DESCRITION
// Defines CosProperty_Hash_Value and CosProperty_Hash_Key classes for the Hash_Map_Manager to
// be used in the CosPropertyService.
//
// = AUTHOR
// Alexander B. Arulanthu <alex@cs.wustl.edu>
//
// ===================================================================================================
#if !defined (COSPROPERTY_HASH_H)
#define COSPROPERTY_HASH_H
#include "ace/Hash_Map_Manager.h"
#include "ace/Synch.h"
#include "orbsvcs/CosPropertyServiceS.h"
#include "orbsvcs/orbsvcs_export.h"
class TAO_ORBSVCS_Export CosProperty_Hash_Key
{
// = TITLE
// Key for the Hash Table.
public:
// = Initialization and termination methods.
CosProperty_Hash_Key (void);
// Default constructor.
CosProperty_Hash_Key (const char * &name);
// Constructor from a const string.
CosProperty_Hash_Key (const CosPropertyService::PropertyName &name);
// Costructor that takes PropertyName.
CosProperty_Hash_Key (const CosProperty_Hash_Key &hash_key);
// Copy constructor.
virtual ~CosProperty_Hash_Key (void);
// Destructor.
virtual int operator == (const CosProperty_Hash_Key &hash_key) const;
// The operator for hash binding and "find"ing.
virtual u_long hash (void) const;
// The function that computes a hash value.
CosPropertyService::PropertyName_var pname_;
// This is still the public variable.
};
class TAO_ORBSVCS_Export CosProperty_Hash_Value
{
// = TITLE
// This will be the value part in the Hash_Table.
public:
// = Initialization and termination methods.
CosProperty_Hash_Value (void);
// Default constructor.
//CosProperty_Hash_Value (const CORBA::Any &any);
// Constructor with Any value.
CosProperty_Hash_Value (const CORBA::Any &any,
const CosPropertyService::PropertyModeType &mode);
// Constructor with the property_value and the property_mode.
CosProperty_Hash_Value (const CosProperty_Hash_Value &hash_value);
// Copy constructor.
virtual ~CosProperty_Hash_Value (void);
// Destructor.
CORBA::Any_var pvalue_;
// property value.
CosPropertyService::PropertyModeType pmode_;
// Property Mode.
};
#endif /* COSPROPERTY_HASH_H */
|