1 kumpf 1.5 //%/////////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 kumpf 1.5 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
|
5 mike 1.2 //
|
6 kumpf 1.5 // 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 mike 1.2 //
|
22 kumpf 1.5 //==============================================================================
|
23 mike 1.2 //
24 // Author: Mike Brasher (mbrasher@bmc.com)
25 //
|
26 kumpf 1.7 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
27 // (carolann_graves@hp.com)
|
28 mike 1.2 //
|
29 bob 1.3 //%////////////////////////////////////////////////////////////////////////////
|
30 mike 1.2
31 #ifndef PegasusCompiler_Compiler_Decl_Context_h
32 #define PegasusCompiler_Compiler_Decl_Context_h
33
|
34 bob 1.3 ///////////////////////////////////////////////////////////////////////////////
|
35 mike 1.2 //
36 // compilerDeclContext
37 //
38 // This context is used by the resolve() methods to lookup dependent
39 // objects during resolution. This subclass takes into account
40 // environments where some or all of the objects which need
41 // to exist are not in the repository, but rather have been
42 // explicitly provided.
43 //
44 //////////////////////////////////////////////////////////////////////////////
45
46 #include <Pegasus/Common/Config.h>
|
47 kumpf 1.8 #include <Pegasus/Common/ArrayInternal.h>
|
48 bob 1.3 #include <Pegasus/Compiler/compilerCommonDefs.h>
|
49 mike 1.2 #include <Pegasus/Repository/RepositoryDeclContext.h>
|
50 bob 1.4 #include <Pegasus/Repository/CIMRepository.h>
|
51 kumpf 1.6 #include <Pegasus/Compiler/Linkage.h>
|
52 mike 1.2
|
53 bob 1.3 PEGASUS_USING_PEGASUS;
54
55 class PEGASUS_COMPILER_LINKAGE compilerDeclContext :
56 public RepositoryDeclContext {
|
57 mike 1.2 public:
|
58 bob 1.3 compilerDeclContext(CIMRepository *repository,
59 compilerCommonDefs::operationType ot);
|
60 mike 1.2
61 virtual ~compilerDeclContext();
62
|
63 bob 1.3 virtual
|
64 kumpf 1.7 CIMQualifierDecl lookupQualifierDecl (const CIMNamespaceName &nameSpace,
65 const CIMName &qualifierName) const;
|
66 mike 1.2 virtual
|
67 kumpf 1.7 CIMClass lookupClass (const CIMNamespaceName &nameSpace,
68 const CIMName &className) const;
|
69 mike 1.2
|
70 kumpf 1.7 void addQualifierDecl (const CIMNamespaceName &nameSpace,
|
71 mike 1.2 const CIMQualifierDecl& x);
72
|
73 kumpf 1.7 void addClass (const CIMNamespaceName &nameSpace,
|
74 mike 1.2 CIMClass &x);
|
75 bob 1.3
|
76 kumpf 1.7 void addInstance (const CIMNamespaceName &nameSpace,
|
77 bob 1.3 CIMInstance &x);
|
78 mike 1.2 private:
|
79 bob 1.3 CIMRepository *_cimRepository;
80 compilerCommonDefs::operationType _ot;
|
81 mike 1.2 Array<CIMClass> _classes;
82 Array<CIMQualifierDecl> _qualifiers;
83 Array<CIMInstance> _instances;
|
84 kumpf 1.7 const CIMClass *_findClassInMemory(const CIMName &classname) const;
85 const CIMQualifierDecl *_findQualifierInMemory(const CIMName &name) const;
|
86 mike 1.2 };
87
|
88 bob 1.3 #endif // PegasusCompiler_Compiler_Decl_Context_h
|