1 kumpf 1.1 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 kumpf 1.1 //==============================================================================
23 //
24 // Author: Carol Ann Krug Graves, Hewlett-Packard Company
25 // (carolann_graves@hp.com)
26 //
27 // Modified By:
28 //
29 //%/////////////////////////////////////////////////////////////////////////////
30
31 #ifndef Pegasus_Resolver_h
32 #define Pegasus_Resolver_h
33
34 #include <Pegasus/Common/CIMClass.h>
35 #include <Pegasus/Common/CIMInstance.h>
36 #include <Pegasus/Common/CIMProperty.h>
37 #include <Pegasus/Common/CIMMethod.h>
38 #include <Pegasus/Common/CIMParameter.h>
39 #include <Pegasus/Common/CIMQualifier.h>
40 #include <Pegasus/Common/String.h>
41 #include <Pegasus/Common/DeclContext.h>
|
42 kumpf 1.2 #include <Pegasus/Common/Linkage.h>
|
43 kumpf 1.1
44 PEGASUS_NAMESPACE_BEGIN
45
46 /**
47 The Resolver class provides methods to resolve CIM objects, including
48 CIMClass, CIMInstance, CIMProperty, CIMMethod, CIMParameter, and
49 CIMQualifier flavor. These methods were moved here from the
50 CIM[objectType] classes. These methods in turn call the resolve () methods
51 of the CIM[objectType]Rep classes, which actually do the work.
52
53 Note that this class contains only internal functions and should not be
54 made available to external users.
55
56 @author Hewlett-Packard Company
57 */
58
59 class PEGASUS_COMMON_LINKAGE Resolver
60 {
61 public:
62
63 /**
64 kumpf 1.1 Resolves the class. Inherits any properties, methods and qualifiers.
65 Makes sure the superClass exists and is consistent with this class.
66 Sets the propagated and class origin flags for each class feature.
67
68 @param theClass CIMClass object to be resolved
69 @param declContext Defines the context in which the class is
70 to be resolved. This provides the basis for
71 other functions to get information from the
72 context to use to resolve the class.
73 @param nameSpace Namespace in which the class is to be placed
74 */
75 static void resolveClass (
76 CIMClass & theClass,
77 DeclContext * declContext,
|
78 kumpf 1.4 const CIMNamespaceName & nameSpace);
|
79 kumpf 1.1
80 /**
81 Resolves the instance. Makes sure the class exists and is not
82 abstract. Validates and propagates qualifiers, if requested.
83 Validates and resolves properties. Sets the propagated and class
84 origin flags.
85
86 @param theInstance CIMInstance object to be resolved
87 @param declContext Defines the context in which the instance is
88 to be resolved. This provides the basis for
89 other functions to get information from the
90 context to use to resolve the instance.
91 @param nameSpace Namespace in which the instance is to be
92 placed
93 @param propagateQualifiers Boolean indicating whether qualifiers are to
94 be propagated
95 */
96 static void resolveInstance (
97 CIMInstance & theInstance,
98 DeclContext * declContext,
|
99 kumpf 1.4 const CIMNamespaceName & nameSpace,
|
100 kumpf 1.1 Boolean propagateQualifiers);
101
102 /**
103 Resolves the instance. Makes sure the class exists and is not
104 abstract. Validates and propagates qualifiers, if requested.
105 Validates and resolves properties. Sets the propagated and class
106 origin flags.
107
108 @param theInstance CIMInstance object to be resolved
109 @param declContext Defines the context in which the instance is
110 to be resolved. This provides the basis for
111 other functions to get information from the
112 context to use to resolve the instance.
113 @param nameSpace Namespace in which the instance is to be
114 placed
115 @param cimClassOut CIMClass output parameter containing the
116 class to which the instance belongs
117 @param propagateQualifiers Boolean indicating whether qualifiers are to
118 be propagated
119 */
120 static void resolveInstance (
121 kumpf 1.1 CIMInstance & theInstance,
122 DeclContext * declContext,
|
123 kumpf 1.4 const CIMNamespaceName & nameSpace,
|
124 kumpf 1.1 CIMConstClass & cimClassOut,
125 Boolean propagateQualifiers);
126
127 /**
128 Resolves the property. Resolution is the process of integrating the
129 property into the the context of a repository or other store.
130 Validates the qualifiers of the property.
131
132 @param theProperty CIMProperty object to be resolved
133 @param declContext Defines the context in which the property is
134 to be resolved. This provides the basis for
135 other functions to get information from the
136 context to use to resolve the property.
137 @param nameSpace Namespace in which the property is to be
138 placed
139 @param isInstancePart Indicates instance or class resolution
140 @param inheritedProperty CIMConstProperty containing the property from
141 the class or superclass
142 @param propagateQualifiers Boolean indicating whether qualifiers are to
143 */
144 static void resolveProperty (
145 kumpf 1.1 CIMProperty & theProperty,
146 DeclContext * declContext,
|
147 kumpf 1.4 const CIMNamespaceName & nameSpace,
|
148 kumpf 1.1 Boolean isInstancePart,
149 const CIMConstProperty & inheritedProperty,
150 Boolean propagateQualifiers);
151
152 // ATTN: P3 03/02/02 KS Needs more documentation.
153 /**
154 Resolves the property. Resolution is the process of integrating the
155 property into the the context of a repository or other store.
156 Validates the qualifiers of the property.
157
158 @param theProperty CIMProperty object to be resolved
159 @param declContext Defines the context in which the property is
160 to be resolved. This provides the basis for
161 other functions to get information from the
162 context to use to resolve the property.
163 @param nameSpace Namespace in which the property is to be
164 placed
165 @param isInstancePart Indicates instance or class resolution
166 @param propagateQualifiers Boolean indicating whether qualifiers are to
167 be propagated
168 */
169 kumpf 1.1 static void resolveProperty (
170 CIMProperty & theProperty,
171 DeclContext * declContext,
|
172 kumpf 1.4 const CIMNamespaceName & nameSpace,
|
173 kumpf 1.1 Boolean isInstancePart,
174 Boolean propagateQualifiers);
175
176 /**
177 Resolves the CIMMethod. Validates the qualifiers and parameters of the
178 method.
179
180 @param theMethod CIMMethod object to be resolved
181 @param declContext Defines the context in which the method is
182 to be resolved. This provides the basis for
183 other functions to get information from the
184 context to use to resolve the method.
185 @param nameSpace Namespace in which the method is to be
186 placed
187 @param inheritedMethod CIMConstMethod containing the method from
188 the class or superclass
189 */
190 static void resolveMethod (
191 CIMMethod & theMethod,
192 DeclContext * declContext,
|
193 kumpf 1.4 const CIMNamespaceName & nameSpace,
|
194 kumpf 1.1 const CIMConstMethod & inheritedMethod);
195
196 /**
197 Resolves the CIMMethod. Validates the qualifiers and parameters of the
198 method.
199
200 @param theMethod CIMMethod object to be resolved
201 @param declContext Defines the context in which the method is
202 to be resolved. This provides the basis for
203 other functions to get information from the
204 context to use to resolve the method.
205 @param nameSpace Namespace in which the method is to be
206 placed
207 */
208 static void resolveMethod (
209 CIMMethod & theMethod,
210 DeclContext * declContext,
|
211 kumpf 1.4 const CIMNamespaceName & nameSpace);
|
212 kumpf 1.1
213 /**
214 Resolves the parameter. Validates the qualifiers of the parameter.
215
216 @param theParameter CIMParameter object to be resolved
217 @param declContext Defines the context in which the parameter is
218 to be resolved. This provides the basis for
219 other functions to get information from the
220 context to use to resolve the parameter.
221 @param nameSpace Namespace in which the parameter is to be
222 placed
223 */
224 static void resolveParameter (
225 CIMParameter & theParameter,
226 DeclContext * declContext,
|
227 kumpf 1.4 const CIMNamespaceName & nameSpace);
|
228 kumpf 1.1
229 /**
230 Resolves the qualifier flavor. This function is used only in object
231 creation to resolve the combination of a qualifer flavor input and
232 the corresponding inherited flavor from declaration or superclass and
233 set the current qualifier to that definition. The function changes
234 the current flavor based on the characteristics of the inheritance.
235
236 @param inheritedFlavor The flavor inherited from higher level
237 @param inherited True if inherited from definition
238 False if this is definition that inherits from
239 the declaration
240 */
241 static void resolveQualifierFlavor (
242 CIMQualifier & theQualifier,
|
243 kumpf 1.3 const CIMFlavor & inheritedFlavor,
|
244 kumpf 1.1 Boolean inherited);
245 };
246
247 PEGASUS_NAMESPACE_END
248
249 #endif /* Pegasus_Resolver_h */
|