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 karl 1.16 //
|
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 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_AssocInstTable_h
35 #define Pegasus_AssocInstTable_h
36
37 #include <iostream>
38 #include <fstream>
39 #include <Pegasus/Common/Config.h>
|
40 kumpf 1.5 #include <Pegasus/Common/CIMObjectPath.h>
|
41 mike 1.4 #include <Pegasus/Common/String.h>
|
42 kumpf 1.8 #include <Pegasus/Common/ArrayInternal.h>
|
43 kumpf 1.7 #include <Pegasus/Repository/Linkage.h>
|
44 mike 1.4
45 PEGASUS_NAMESPACE_BEGIN
46
47 /** Maintains all associations for a given namesspace.
48 */
49 class PEGASUS_REPOSITORY_LINKAGE AssocInstTable
50 {
51 public:
52
53 /** Appends a row into the association table. There is no checking
|
54 kumpf 1.15 for duplicate entries (the caller ensures this). The case of
55 the arguments doesn't matter. They are ignored during comparison.
|
56 mike 1.4 */
57 static void append(
|
58 kumpf 1.15 PEGASUS_STD(ofstream)& os,
59 const String& assocInstanceName,
60 const CIMName& assocClassName,
61 const String& fromInstanceName,
62 const CIMName& fromClassName,
63 const CIMName& fromPropertyName,
64 const String& toInstanceName,
65 const CIMName& toClassName,
66 const CIMName& toPropertyName);
|
67 mike 1.4
68 /** Appends a row into the association table. There is no checking
|
69 kumpf 1.15 for duplicate entries (the caller ensures this). The case of the
70 arguments doesn't matter. Case is ignored during comparison.
|
71 mike 1.4 */
72 static void append(
|
73 kumpf 1.15 const String& path,
74 const String& assocInstanceName,
75 const CIMName& assocClassName,
76 const String& fromInstanceName,
77 const CIMName& fromClassName,
78 const CIMName& fromPropertyName,
79 const String& toInstanceName,
80 const CIMName& toClassName,
81 const CIMName& toPropertyName);
|
82 mike 1.4
83 /** Deletes the given association from the table by removing every entry
|
84 kumpf 1.15 with an assocInstanceName equal to the assocInstanceName parameter.
85 @returns true if such an association was found.
|
86 mike 1.4 */
87 static Boolean deleteAssociation(
|
88 kumpf 1.15 const String& path,
89 const CIMObjectPath& assocInstanceName);
|
90 mike 1.4
|
91 kumpf 1.15 /** Finds all associators of the given object. See
92 CIMOperations::associators() for a full description.
|
93 mike 1.4 */
94 static Boolean getAssociatorNames(
|
95 kumpf 1.15 const String& path,
96 const CIMObjectPath& objectName,
|
97 kumpf 1.10 const Array<CIMName>& assocClassList,
98 const Array<CIMName>& resultClassList,
|
99 mike 1.4 const String& role,
100 const String& resultRole,
|
101 kumpf 1.15 Array<String>& associatorNames);
|
102 mike 1.4
103 /** Obtain all references (association instance names) in which the
|
104 kumpf 1.15 given object is involved. See CIMOperations::associators() for a
105 full description.
|
106 mike 1.4 */
107 static Boolean getReferenceNames(
|
108 kumpf 1.15 const String& path,
109 const CIMObjectPath& objectName,
110 const Array<CIMName>& resultClassList,
111 const String& role,
112 Array<String>& referenceNames);
|
113 mike 1.4
114 private:
115
116 AssocInstTable() { /* private */ }
117 };
118
119 PEGASUS_NAMESPACE_END
120
121 #endif /* Pegasus_AssocInstTable_h */
|