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