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

 1 bob   1.3 //%///////////////////////////////////////////////////////////////////////////
 2 mike  1.2 //
 3           // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 4 bob   1.3 //
 5 mike  1.2 // Permission is hereby granted, free of charge, to any person obtaining a
 6           // copy of this software and associated documentation files (the "Software"),
 7           // to deal in the Software without restriction, including without limitation
 8           // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 9           // and/or sell copies of the Software, and to permit persons to whom the
10           // Software is furnished to do so, subject to the following conditions:
11           //
12           // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13           // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14           // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15           // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16           // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17           // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18           // DEALINGS IN THE SOFTWARE.
19           //
20 bob   1.3 //=============================================================================
21 mike  1.2 //
22           // Author: Mike Brasher (mbrasher@bmc.com)
23           //
24           // Modified By:
25           //
26 bob   1.3 //%////////////////////////////////////////////////////////////////////////////
27 mike  1.2 
28           #ifndef PegasusCompiler_Compiler_Decl_Context_h
29           #define PegasusCompiler_Compiler_Decl_Context_h
30           
31 bob   1.3 ///////////////////////////////////////////////////////////////////////////////
32 mike  1.2 //
33           // compilerDeclContext
34           //
35           //	This context is used by the resolve() methods to lookup dependent
36           //	objects during resolution.  This subclass takes into account
37           //      environments where some or all of the objects which need
38           //      to exist are not in the repository, but rather have been
39           //      explicitly provided.
40           //
41           //////////////////////////////////////////////////////////////////////////////
42           
43           #include <Pegasus/Common/Config.h>
44           #include <Pegasus/Common/Array.h>
45 bob   1.3 #include <Pegasus/Compiler/compilerCommonDefs.h>
46 mike  1.2 #include <Pegasus/Repository/RepositoryDeclContext.h>
47 bob   1.4 #include <Pegasus/Repository/CIMRepository.h>
48 mike  1.2 
49 bob   1.3 PEGASUS_USING_PEGASUS;
50           
51           class PEGASUS_COMPILER_LINKAGE compilerDeclContext :
52           public RepositoryDeclContext {
53 mike  1.2  public:
54 bob   1.3   compilerDeclContext(CIMRepository *repository,
55           			      compilerCommonDefs::operationType ot);
56 mike  1.2 
57             virtual ~compilerDeclContext();
58           
59 bob   1.3   virtual
60 mike  1.2     CIMQualifierDecl lookupQualifierDecl (const String &nameSpace,
61           					  const String &qualifierName) const;
62             virtual
63               CIMClass         lookupClass        (const String &nameSpace,
64           					 const String &className) const;
65           
66             void               addQualifierDecl   (const String &nameSpace,
67           					 const CIMQualifierDecl& x);
68           
69             void               addClass           (const String &nameSpace,
70           					 CIMClass &x);
71 bob   1.3 
72             void               addInstance        (const String &nameSpace,
73           					 CIMInstance &x);
74 mike  1.2  private:
75 bob   1.3   CIMRepository *_cimRepository;
76             compilerCommonDefs::operationType _ot;
77 mike  1.2   Array<CIMClass>         _classes;
78             Array<CIMQualifierDecl> _qualifiers;
79             Array<CIMInstance>      _instances;
80             const CIMClass *_findClassInMemory(const String &classname) const;
81             const CIMQualifierDecl *_findQualifierInMemory(const String &name) const;
82           };
83           
84 bob   1.3 #endif // PegasusCompiler_Compiler_Decl_Context_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2