1 karl 1.16 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.3 //
|
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.16 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.3 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.5 // 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.3 // 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.5 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.3 // 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.5 // 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.3 // 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.8 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
|
35 david.dillard 1.14 // (carolann_graves@hp.com)
|
36 karl 1.9 // Karl Schopmeyer (k.schopmeyer@opengroup.org)
|
37 kumpf 1.10 // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
38 david.dillard 1.14 // David Dillard, VERITAS Software Corp.
39 // (david.dillard@veritas.com)
|
40 r.kieninger 1.15 // Robert Kieninger, IBM (kieningr@de.ibm.com)
|
41 mike 1.3 //
42 //%/////////////////////////////////////////////////////////////////////////////
43
44 #ifndef Pegasus_AssocClassTable_h
45 #define Pegasus_AssocClassTable_h
46
47 #include <fstream>
48 #include <Pegasus/Common/Config.h>
|
49 kumpf 1.4 #include <Pegasus/Common/CIMObjectPath.h>
|
50 kumpf 1.7 #include <Pegasus/Common/ArrayInternal.h>
|
51 kumpf 1.6 #include <Pegasus/Repository/Linkage.h>
|
52 mike 1.17 #include <Pegasus/Common/ReadWriteSem.h>
|
53 r.kieninger 1.15 #include "AssocClassCache.h"
|
54 mike 1.3
55 PEGASUS_NAMESPACE_BEGIN
56
57 /** Maintains all associations for a given namesspace.
58 */
59 class PEGASUS_REPOSITORY_LINKAGE AssocClassTable
60 {
61 public:
62
63 /** Appends a row into the association class table. There is no checking
|
64 david.dillard 1.14 for duplicate entries (the caller ensures this). The case of
65 the arguments doesn't matter. They are ignored during comparison.
|
66 mike 1.3 */
67 static void append(
|
68 david.dillard 1.14 PEGASUS_STD(ofstream)& os,
|
69 r.kieninger 1.15 const String& path,
|
70 david.dillard 1.14 const CIMName& assocClassName,
71 const CIMName& fromClassName,
72 const CIMName& fromPropertyName,
73 const CIMName& toClassName,
74 const CIMName& toPropertyName);
|
75 mike 1.3
76 /** Appends a row into the association class table. There is no checking
|
77 david.dillard 1.14 for duplicate entries (the caller ensures this). The case of the
78 arguments doesn't matter. Case is ignored during comparison.
|
79 mike 1.3 */
80 static void append(
|
81 david.dillard 1.14 const String& path,
82 const CIMName& assocClassName,
83 const CIMName& fromClassName,
84 const CIMName& fromPropertyName,
85 const CIMName& toClassName,
86 const CIMName& toPropertyName);
|
87 mike 1.3
88 /** Deletes the given association from the table by removing every entry
|
89 david.dillard 1.14 with the given assocClassName.
90 @returns true if such an association was found.
|
91 mike 1.3 */
92 static Boolean deleteAssociation(
|
93 david.dillard 1.14 const String& path,
94 const CIMName& assocClassName);
|
95 mike 1.3
96 /** Finds all associators of the given class. See
|
97 david.dillard 1.14 CIMOperations::associators() for a full description.
|
98 mike 1.3 */
99 static Boolean getAssociatorNames(
|
100 david.dillard 1.14 const String& path,
101 const Array<CIMName>& classList,
|
102 kumpf 1.10 const Array<CIMName>& assocClassList,
103 const Array<CIMName>& resultClassList,
|
104 mike 1.3 const String& role,
105 const String& resultRole,
|
106 david.dillard 1.14 Array<String>& associatorNames);
|
107 mike 1.3
|
108 kumpf 1.10 /** Get all references (association class names) in which the
|
109 david.dillard 1.14 given class involved. See CIMOperations::referenceNames() for a
110 full description.
|
111 mike 1.3 */
112 static Boolean getReferenceNames(
|
113 david.dillard 1.14 const String& path,
114 const Array<CIMName>& classList,
115 const Array<CIMName>& resultClassList,
116 const String& role,
117 Array<String>& referenceNames);
|
118 karl 1.9
|
119 r.kieninger 1.15
120 static void removeCaches();
121
|
122 mike 1.3 private:
123
|
124 r.kieninger 1.15 static Boolean _InitializeCache(
125 AssocClassCache *cache,
126 const String& path);
127
|
128 mike 1.3 AssocClassTable() { /* private */ }
|
129 r.kieninger 1.15 static ReadWriteSem _classCacheLock;
|
130 mike 1.3 };
131
132 PEGASUS_NAMESPACE_END
133
134 #endif /* Pegasus_AssocClassTable_h */
|