1 karl 1.13 //%2005////////////////////////////////////////////////////////////////////////
|
2 mike 1.4 //
|
3 karl 1.12 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.11 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.12 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.13 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 mike 1.4 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
13 kumpf 1.6 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
16 mike 1.4 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
18 //
|
19 kumpf 1.6 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
20 mike 1.4 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
22 kumpf 1.6 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
25 mike 1.4 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //==============================================================================
29 //
30 // Author: Mike Brasher (mbrasher@bmc.com)
31 //
|
32 kumpf 1.9 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
33 // (carolann_graves@hp.com)
|
34 kumpf 1.10 // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
35 mike 1.4 //
36 //%/////////////////////////////////////////////////////////////////////////////
37
38 #ifndef Pegasus_AssocInstTable_h
39 #define Pegasus_AssocInstTable_h
40
41 #include <iostream>
42 #include <fstream>
43 #include <Pegasus/Common/Config.h>
|
44 kumpf 1.5 #include <Pegasus/Common/CIMObjectPath.h>
|
45 mike 1.4 #include <Pegasus/Common/String.h>
|
46 kumpf 1.8 #include <Pegasus/Common/ArrayInternal.h>
|
47 kumpf 1.7 #include <Pegasus/Repository/Linkage.h>
|
48 mike 1.4
49 PEGASUS_NAMESPACE_BEGIN
50
51 /** Maintains all associations for a given namesspace.
52 */
53 class PEGASUS_REPOSITORY_LINKAGE AssocInstTable
54 {
55 public:
56
57 /** Appends a row into the association table. There is no checking
58 for duplicate entries (the caller ensures this). The case of
59 the arguments doesn't matter. They are ignored during comparison.
60 */
61 static void append(
62 PEGASUS_STD(ofstream)& os,
63 const String& assocInstanceName,
|
64 kumpf 1.9 const CIMName& assocClassName,
|
65 mike 1.4 const String& fromInstanceName,
|
66 kumpf 1.9 const CIMName& fromClassName,
67 const CIMName& fromPropertyName,
|
68 mike 1.4 const String& toInstanceName,
|
69 kumpf 1.9 const CIMName& toClassName,
70 const CIMName& toPropertyName);
|
71 mike 1.4
72 /** Appends a row into the association table. There is no checking
73 for duplicate entries (the caller ensures this). The case of the
74 arguments doesn't matter. Case is ignored during comparison.
75 */
76 static void append(
77 const String& path,
78 const String& assocInstanceName,
|
79 kumpf 1.9 const CIMName& assocClassName,
|
80 mike 1.4 const String& fromInstanceName,
|
81 kumpf 1.9 const CIMName& fromClassName,
82 const CIMName& fromPropertyName,
|
83 mike 1.4 const String& toInstanceName,
|
84 kumpf 1.9 const CIMName& toClassName,
85 const CIMName& toPropertyName);
|
86 mike 1.4
87 /** Deletes the given association from the table by removing every entry
88 with an assocInstanceName equal to the assocInstanceName parameter.
89 @returns true if such an association was found.
90 */
91 static Boolean deleteAssociation(
92 const String& path,
|
93 kumpf 1.5 const CIMObjectPath& assocInstanceName);
|
94 mike 1.4
95 /** Finds all associators of the given object. See
96 CIMOperations::associators() for a full description.
97 */
98 static Boolean getAssociatorNames(
99 const String& path,
|
100 kumpf 1.5 const CIMObjectPath& objectName,
|
101 kumpf 1.10 const Array<CIMName>& assocClassList,
102 const Array<CIMName>& resultClassList,
|
103 mike 1.4 const String& role,
104 const String& resultRole,
105 Array<String>& associatorNames);
106
107 /** Obtain all references (association instance names) in which the
108 given object is involved. See CIMOperations::associators() for a
109 full description.
110 */
111 static Boolean getReferenceNames(
112 const String& path,
|
113 kumpf 1.5 const CIMObjectPath& objectName,
|
114 kumpf 1.10 const Array<CIMName>& resultClassList,
|
115 mike 1.4 const String& role,
116 Array<String>& referenceNames);
117
118 private:
119
120 AssocInstTable() { /* private */ }
121 };
122
123 PEGASUS_NAMESPACE_END
124
125 #endif /* Pegasus_AssocInstTable_h */
|