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

  1 karl  1.21 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.8  //
  3 karl  1.19 // 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.18 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.19 // 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.20 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.21 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.8  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 kumpf 1.13 // 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 mike  1.8  // 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 kumpf 1.13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.8  // 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 kumpf 1.13 // 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 mike  1.8  // 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            #ifndef Pegasus_DeclContext_h
 35            #define Pegasus_DeclContext_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 kumpf 1.17 #include <Pegasus/Common/ArrayInternal.h>
 39 kumpf 1.9  #include <Pegasus/Common/Pair.h>
 40 kumpf 1.16 #include <Pegasus/Common/CIMName.h>
 41 mike  1.8  #include <Pegasus/Common/CIMClass.h>
 42            #include <Pegasus/Common/CIMQualifierDecl.h>
 43 kumpf 1.15 #include <Pegasus/Common/Linkage.h>
 44 mike  1.8  
 45            PEGASUS_NAMESPACE_BEGIN
 46            
 47            /**
 48                This class is used internally as a source of CIM declarations.
 49 kumpf 1.14     It is passed to the resolve[objectType] () methods of the Resolver class
 50 kumpf 1.23     (where [objectType] is Class, Instance, Property, Method, Parameter), and
 51                in turn to the resolve () methods of the CIM[objectType]Rep classes.
 52                Methods are provided for looking up class, qualifier, and instance
 53                declarations.  This is an abstract base class: implementations must be
 54 kumpf 1.14     provided by derived classes.
 55 mike  1.8  */
 56            class PEGASUS_COMMON_LINKAGE DeclContext
 57            {
 58            public:
 59            
 60                virtual ~DeclContext();
 61            
 62                virtual CIMQualifierDecl lookupQualifierDecl(
 63 kumpf 1.23         const CIMNamespaceName& nameSpace,
 64                    const CIMName& name) const = 0;
 65 mike  1.8  
 66                virtual CIMClass lookupClass(
 67 kumpf 1.23         const CIMNamespaceName& nameSpace,
 68                    const CIMName& name) const = 0;
 69 mike  1.8  };
 70            
 71 kumpf 1.16 typedef Pair<CIMNamespaceName, CIMClass> CPair;
 72            typedef Pair<CIMNamespaceName, CIMQualifierDecl> QPair;
 73 mike  1.8  
 74            class PEGASUS_COMMON_LINKAGE SimpleDeclContext : public DeclContext
 75            {
 76            public:
 77            
 78                virtual ~SimpleDeclContext();
 79            
 80                void addQualifierDecl(
 81 kumpf 1.23         const CIMNamespaceName& nameSpace,
 82                    const CIMQualifierDecl& x);
 83 mike  1.8  
 84                void addClass(
 85 kumpf 1.23         const CIMNamespaceName& nameSpace,
 86                    const CIMClass& x);
 87 mike  1.8  
 88                virtual CIMQualifierDecl lookupQualifierDecl(
 89 kumpf 1.23         const CIMNamespaceName& nameSpace,
 90                    const CIMName& name) const;
 91 mike  1.8  
 92                virtual CIMClass lookupClass(
 93 kumpf 1.23         const CIMNamespaceName& nameSpace,
 94                    const CIMName& name) const;
 95 mike  1.8  
 96            private:
 97            
 98                Array<CPair> _classDeclarations;
 99                Array<QPair> _qualifierDeclarations;
100            };
101            
102            PEGASUS_NAMESPACE_END
103            
104            #endif /* Pegasus_DeclContext_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2