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

  1 martin 1.24 //%LICENSE////////////////////////////////////////////////////////////////
  2             // 
  3             // 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             // 
 10             // 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             // 
 17             // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19             // 
 20             // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21             // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 22 martin 1.24 // 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 mike   1.8  // 
 28 martin 1.24 //////////////////////////////////////////////////////////////////////////
 29 mike   1.8  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #ifndef Pegasus_DeclContext_h
 33             #define Pegasus_DeclContext_h
 34             
 35             #include <Pegasus/Common/Config.h>
 36 kumpf  1.17 #include <Pegasus/Common/ArrayInternal.h>
 37 kumpf  1.9  #include <Pegasus/Common/Pair.h>
 38 kumpf  1.16 #include <Pegasus/Common/CIMName.h>
 39 mike   1.8  #include <Pegasus/Common/CIMClass.h>
 40             #include <Pegasus/Common/CIMQualifierDecl.h>
 41 kumpf  1.15 #include <Pegasus/Common/Linkage.h>
 42 mike   1.8  
 43             PEGASUS_NAMESPACE_BEGIN
 44             
 45             /**
 46                 This class is used internally as a source of CIM declarations.
 47 kumpf  1.14     It is passed to the resolve[objectType] () methods of the Resolver class
 48 kumpf  1.23     (where [objectType] is Class, Instance, Property, Method, Parameter), and
 49                 in turn to the resolve () methods of the CIM[objectType]Rep classes.
 50                 Methods are provided for looking up class, qualifier, and instance
 51                 declarations.  This is an abstract base class: implementations must be
 52 kumpf  1.14     provided by derived classes.
 53 mike   1.8  */
 54             class PEGASUS_COMMON_LINKAGE DeclContext
 55             {
 56             public:
 57             
 58                 virtual ~DeclContext();
 59             
 60                 virtual CIMQualifierDecl lookupQualifierDecl(
 61 kumpf  1.23         const CIMNamespaceName& nameSpace,
 62                     const CIMName& name) const = 0;
 63 mike   1.8  
 64                 virtual CIMClass lookupClass(
 65 kumpf  1.23         const CIMNamespaceName& nameSpace,
 66                     const CIMName& name) const = 0;
 67 mike   1.8  };
 68             
 69 kumpf  1.16 typedef Pair<CIMNamespaceName, CIMClass> CPair;
 70             typedef Pair<CIMNamespaceName, CIMQualifierDecl> QPair;
 71 mike   1.8  
 72             class PEGASUS_COMMON_LINKAGE SimpleDeclContext : public DeclContext
 73             {
 74             public:
 75             
 76                 virtual ~SimpleDeclContext();
 77             
 78                 void addQualifierDecl(
 79 kumpf  1.23         const CIMNamespaceName& nameSpace,
 80                     const CIMQualifierDecl& x);
 81 mike   1.8  
 82                 void addClass(
 83 kumpf  1.23         const CIMNamespaceName& nameSpace,
 84                     const CIMClass& x);
 85 mike   1.8  
 86                 virtual CIMQualifierDecl lookupQualifierDecl(
 87 kumpf  1.23         const CIMNamespaceName& nameSpace,
 88                     const CIMName& name) const;
 89 mike   1.8  
 90                 virtual CIMClass lookupClass(
 91 kumpf  1.23         const CIMNamespaceName& nameSpace,
 92                     const CIMName& name) const;
 93 mike   1.8  
 94             private:
 95             
 96                 Array<CPair> _classDeclarations;
 97                 Array<QPair> _qualifierDeclarations;
 98             };
 99             
100             PEGASUS_NAMESPACE_END
101             
102             #endif /* Pegasus_DeclContext_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2