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