1 martin 1.18 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.19 //
|
3 martin 1.18 // 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.19 //
|
10 martin 1.18 // 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.19 //
|
17 martin 1.18 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.19 //
|
20 martin 1.18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.19 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.18 // 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.19 //
|
28 martin 1.18 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.2 //
|
30 bob 1.3 //%////////////////////////////////////////////////////////////////////////////
|
31 mike 1.2
32 #ifndef PegasusCompiler_Compiler_Decl_Context_h
33 #define PegasusCompiler_Compiler_Decl_Context_h
34
|
35 bob 1.3 ///////////////////////////////////////////////////////////////////////////////
|
36 mike 1.2 //
37 // compilerDeclContext
38 //
|
39 karl 1.16 // This context is used by the resolve() methods to lookup dependent
40 // objects during resolution. This subclass takes into account
|
41 mike 1.2 // environments where some or all of the objects which need
42 // to exist are not in the repository, but rather have been
43 // explicitly provided.
44 //
45 //////////////////////////////////////////////////////////////////////////////
46
47 #include <Pegasus/Common/Config.h>
|
48 kumpf 1.8 #include <Pegasus/Common/ArrayInternal.h>
|
49 mike 1.2 #include <Pegasus/Repository/RepositoryDeclContext.h>
|
50 bob 1.4 #include <Pegasus/Repository/CIMRepository.h>
|
51 kumpf 1.12 #include <Pegasus/Compiler/compilerCommonDefs.h>
|
52 kumpf 1.6 #include <Pegasus/Compiler/Linkage.h>
|
53 mike 1.2
|
54 kumpf 1.11 PEGASUS_NAMESPACE_BEGIN
|
55 bob 1.3
56 class PEGASUS_COMPILER_LINKAGE compilerDeclContext :
|
57 karl 1.16 public RepositoryDeclContext
58 {
|
59 mike 1.2 public:
|
60 dmitry.mikulin 1.17 compilerDeclContext(compilerCommonDefs::operationType ot);
|
61 mike 1.2
62 virtual ~compilerDeclContext();
63
|
64 bob 1.3 virtual
|
65 kumpf 1.7 CIMQualifierDecl lookupQualifierDecl (const CIMNamespaceName &nameSpace,
|
66 karl 1.16 const CIMName &qualifierName) const;
|
67 mike 1.2 virtual
|
68 kumpf 1.7 CIMClass lookupClass (const CIMNamespaceName &nameSpace,
|
69 karl 1.16 const CIMName &className) const;
|
70 mike 1.2
|
71 kumpf 1.7 void addQualifierDecl (const CIMNamespaceName &nameSpace,
|
72 karl 1.16 const CIMQualifierDecl& x);
|
73 mike 1.2
|
74 kumpf 1.7 void addClass (const CIMNamespaceName &nameSpace,
|
75 karl 1.16 CIMClass &x);
|
76 bob 1.3
|
77 kumpf 1.7 void addInstance (const CIMNamespaceName &nameSpace,
|
78 karl 1.16 CIMInstance &x);
|
79 gerarda 1.9
80 void modifyClass (const CIMNamespaceName &nameSpace,
|
81 karl 1.16 CIMClass &x);
|
82 gerarda 1.9
|
83 mike 1.2 private:
|
84 bob 1.3 compilerCommonDefs::operationType _ot;
|
85 mike 1.2 Array<CIMClass> _classes;
86 Array<CIMQualifierDecl> _qualifiers;
87 Array<CIMInstance> _instances;
|
88 kumpf 1.7 const CIMClass *_findClassInMemory(const CIMName &classname) const;
89 const CIMQualifierDecl *_findQualifierInMemory(const CIMName &name) const;
|
90 mike 1.2 };
|
91 kumpf 1.11
92 PEGASUS_NAMESPACE_END
|
93 mike 1.2
|
94 kumpf 1.12 #endif // PegasusCompiler_Compiler_Decl_Context_h
95
|