(file) Return to Resolver.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 karl  1.8 //%2006////////////////////////////////////////////////////////////////////////
  2 kumpf 1.1 //
  3 karl  1.6 // 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.5 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.6 // 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.7 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.8 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13 kumpf 1.1 //
 14           // Permission is hereby granted, free of charge, to any person obtaining a copy
 15           // 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           // 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           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22           // 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           // 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           // 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 kumpf 1.1 #ifndef Pegasus_Resolver_h
 35           #define Pegasus_Resolver_h
 36           
 37           #include <Pegasus/Common/CIMClass.h>
 38           #include <Pegasus/Common/CIMInstance.h>
 39           #include <Pegasus/Common/CIMProperty.h>
 40           #include <Pegasus/Common/CIMMethod.h>
 41           #include <Pegasus/Common/CIMParameter.h>
 42           #include <Pegasus/Common/CIMQualifier.h>
 43           #include <Pegasus/Common/String.h>
 44           #include <Pegasus/Common/DeclContext.h>
 45 kumpf 1.2 #include <Pegasus/Common/Linkage.h>
 46 kumpf 1.1 
 47           PEGASUS_NAMESPACE_BEGIN
 48           
 49           /**
 50 kumpf 1.9     The Resolver class provides methods to resolve CIM objects, including
 51               CIMClass, CIMInstance, CIMProperty, CIMMethod, CIMParameter, and
 52               CIMQualifier flavor.  These methods were moved here from the
 53               CIM[objectType] classes.  These methods in turn call the resolve() methods
 54 kumpf 1.1     of the CIM[objectType]Rep classes, which actually do the work.
 55           
 56 kumpf 1.9     Note that this class contains only internal functions and should not be
 57 kumpf 1.1     made available to external users.
 58            */
 59           
 60           class PEGASUS_COMMON_LINKAGE Resolver
 61           {
 62           public:
 63           
 64 kumpf 1.9     /**
 65                   Resolves the class.  Inherits any properties, methods and qualifiers.
 66                   Makes sure the superClass exists and is consistent with this class.
 67 kumpf 1.1         Sets the propagated and class origin flags for each class feature.
 68           
 69                   @param theClass            CIMClass object to be resolved
 70                   @param declContext         Defines the context in which the class is
 71                                              to be resolved.  This provides the basis for
 72 kumpf 1.9                                    other functions to get information from the
 73 kumpf 1.1                                    context to use to resolve the class.
 74                   @param nameSpace           Namespace in which the class is to be placed
 75               */
 76 kumpf 1.9     static void resolveClass(
 77                   CIMClass& theClass,
 78                   DeclContext* declContext,
 79                   const CIMNamespaceName& nameSpace);
 80 kumpf 1.1 
 81 kumpf 1.9     /**
 82 kumpf 1.1         Resolves the instance.  Makes sure the class exists and is not
 83 kumpf 1.9         abstract.  Validates and propagates qualifiers, if requested.
 84                   Validates and resolves properties.  Sets the propagated and class
 85 kumpf 1.1         origin flags.
 86           
 87                   @param theInstance         CIMInstance object to be resolved
 88                   @param declContext         Defines the context in which the instance is
 89                                              to be resolved.  This provides the basis for
 90 kumpf 1.9                                    other functions to get information from the
 91 kumpf 1.1                                    context to use to resolve the instance.
 92 kumpf 1.9         @param nameSpace           Namespace in which the instance is to be
 93 kumpf 1.1                                    placed
 94                   @param propagateQualifiers Boolean indicating whether qualifiers are to
 95 kumpf 1.9                                    be propagated
 96 kumpf 1.1     */
 97 kumpf 1.9     static void resolveInstance(
 98                   CIMInstance& theInstance,
 99                   DeclContext* declContext,
100                   const CIMNamespaceName& nameSpace,
101 kumpf 1.1         Boolean propagateQualifiers);
102           
103 kumpf 1.9     /**
104 kumpf 1.1         Resolves the instance.  Makes sure the class exists and is not
105 kumpf 1.9         abstract.  Validates and propagates qualifiers, if requested.
106                   Validates and resolves properties.  Sets the propagated and class
107 kumpf 1.1         origin flags.
108           
109                   @param theInstance         CIMInstance object to be resolved
110                   @param declContext         Defines the context in which the instance is
111                                              to be resolved.  This provides the basis for
112 kumpf 1.9                                    other functions to get information from the
113 kumpf 1.1                                    context to use to resolve the instance.
114 kumpf 1.9         @param nameSpace           Namespace in which the instance is to be
115 kumpf 1.1                                    placed
116 kumpf 1.9         @param cimClassOut         CIMClass output parameter containing the
117 kumpf 1.1                                    class to which the instance belongs
118                   @param propagateQualifiers Boolean indicating whether qualifiers are to
119 kumpf 1.9                                    be propagated
120 kumpf 1.1     */
121 kumpf 1.9     static void resolveInstance(
122                   CIMInstance& theInstance,
123                   DeclContext* declContext,
124                   const CIMNamespaceName& nameSpace,
125                   CIMConstClass& cimClassOut,
126 kumpf 1.1         Boolean propagateQualifiers);
127           
128 kumpf 1.9     /**
129                   Resolves the property.  Resolution is the process of integrating the
130                   property into the the context of a repository or other store.
131 kumpf 1.1         Validates the qualifiers of the property.
132           
133                   @param theProperty         CIMProperty object to be resolved
134                   @param declContext         Defines the context in which the property is
135                                              to be resolved.  This provides the basis for
136 kumpf 1.9                                    other functions to get information from the
137 kumpf 1.1                                    context to use to resolve the property.
138 kumpf 1.9         @param nameSpace           Namespace in which the property is to be
139 kumpf 1.1                                    placed
140                   @param isInstancePart      Indicates instance or class resolution
141                   @param inheritedProperty   CIMConstProperty containing the property from
142                                              the class or superclass
143                   @param propagateQualifiers Boolean indicating whether qualifiers are to
144               */
145 kumpf 1.9     static void resolveProperty(
146                   CIMProperty& theProperty,
147                   DeclContext* declContext,
148                   const CIMNamespaceName& nameSpace,
149                   Boolean isInstancePart,
150                   const CIMConstProperty& inheritedProperty,
151                   Boolean propagateQualifiers);
152 kumpf 1.1 
153               //  ATTN: P3 03/02/02 KS Needs more documentation.
154 kumpf 1.9     /**
155                   Resolves the property.  Resolution is the process of integrating the
156                   property into the the context of a repository or other store.
157 kumpf 1.1         Validates the qualifiers of the property.
158           
159                   @param theProperty         CIMProperty object to be resolved
160                   @param declContext         Defines the context in which the property is
161                                              to be resolved.  This provides the basis for
162 kumpf 1.9                                    other functions to get information from the
163 kumpf 1.1                                    context to use to resolve the property.
164 kumpf 1.9         @param nameSpace           Namespace in which the property is to be
165 kumpf 1.1                                    placed
166                   @param isInstancePart      Indicates instance or class resolution
167                   @param propagateQualifiers Boolean indicating whether qualifiers are to
168 kumpf 1.9                                    be propagated
169 kumpf 1.1     */
170 kumpf 1.9     static void resolveProperty(
171                   CIMProperty& theProperty,
172                   DeclContext* declContext,
173                   const CIMNamespaceName& nameSpace,
174                   Boolean isInstancePart,
175                   Boolean propagateQualifiers);
176 kumpf 1.1 
177 kumpf 1.9     /**
178 kumpf 1.1         Resolves the CIMMethod.  Validates the qualifiers and parameters of the
179                   method.
180           
181                   @param theMethod           CIMMethod object to be resolved
182                   @param declContext         Defines the context in which the method is
183                                              to be resolved.  This provides the basis for
184 kumpf 1.9                                    other functions to get information from the
185 kumpf 1.1                                    context to use to resolve the method.
186 kumpf 1.9         @param nameSpace           Namespace in which the method is to be
187 kumpf 1.1                                    placed
188                   @param inheritedMethod     CIMConstMethod containing the method from
189                                              the class or superclass
190               */
191 kumpf 1.9     static void resolveMethod(
192                   CIMMethod& theMethod,
193                   DeclContext* declContext,
194                   const CIMNamespaceName& nameSpace,
195                   const CIMConstMethod& inheritedMethod);
196 kumpf 1.1 
197 kumpf 1.9     /**
198 kumpf 1.1         Resolves the CIMMethod.  Validates the qualifiers and parameters of the
199                   method.
200           
201                   @param theMethod           CIMMethod object to be resolved
202                   @param declContext         Defines the context in which the method is
203                                              to be resolved.  This provides the basis for
204 kumpf 1.9                                    other functions to get information from the
205 kumpf 1.1                                    context to use to resolve the method.
206 kumpf 1.9         @param nameSpace           Namespace in which the method is to be
207 kumpf 1.1                                    placed
208               */
209 kumpf 1.9     static void resolveMethod(
210                   CIMMethod& theMethod,
211                   DeclContext* declContext,
212                   const CIMNamespaceName& nameSpace);
213 kumpf 1.1 
214 kumpf 1.9     /**
215 kumpf 1.1         Resolves the parameter.  Validates the qualifiers of the parameter.
216           
217                   @param theParameter        CIMParameter object to be resolved
218                   @param declContext         Defines the context in which the parameter is
219                                              to be resolved.  This provides the basis for
220 kumpf 1.9                                    other functions to get information from the
221 kumpf 1.1                                    context to use to resolve the parameter.
222 kumpf 1.9         @param nameSpace           Namespace in which the parameter is to be
223 kumpf 1.1                                    placed
224               */
225 kumpf 1.9     static void resolveParameter(
226                   CIMParameter& theParameter,
227                   DeclContext* declContext,
228                   const CIMNamespaceName& nameSpace);
229 kumpf 1.1 
230 kumpf 1.9     /**
231                   Resolves the qualifier flavor.  This function is used only in object
232 kumpf 1.1         creation to resolve the combination of a qualifer flavor input and
233 kumpf 1.9         the corresponding inherited flavor from declaration or superclass and
234                   set the current qualifier to that definition.  The function changes
235 kumpf 1.1         the current flavor based on the characteristics of the inheritance.
236           
237                   @param inheritedFlavor   The flavor inherited from higher level
238 kumpf 1.9         @param inherited         True if inherited from definition
239 kumpf 1.1                                  False if this is definition that inherits from
240                                            the declaration
241               */
242 kumpf 1.9     static void resolveQualifierFlavor(
243                   CIMQualifier& theQualifier,
244                   const CIMFlavor& inheritedFlavor,
245 kumpf 1.1         Boolean inherited);
246           };
247           
248           PEGASUS_NAMESPACE_END
249           
250           #endif /* Pegasus_Resolver_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2