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

  1 karl  1.13 //%2006////////////////////////////////////////////////////////////////////////
  2 bob   1.1  //
  3 karl  1.9  // 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.8  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.9  // 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.10 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.13 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 bob   1.1  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 kumpf 1.4  // 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 bob   1.1  // 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 karl  1.15 //
 21 kumpf 1.4  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 bob   1.1  // 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.4  // 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 bob   1.1  // 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            // This class is the interface between the cimmof compiler, in its various
 35            // forms, and the various Pegasus repository interfaces which as the
 36            // time this class was created were CIMRepository and CIMClient.
 37            //
 38            // This class supports only the operations that the compiler needs, which
 39            // are
 40            //     addClass()
 41            //     addInstance()
 42            //     addQualifier()
 43            //     createNameSpace()
 44            //
 45            // If we create compiler-like tools to do mass changes to the repository,
 46            // then I expect that we will add methods to deal with the modification.
 47            // This class is intended to be very light, basically making it easy
 48 bob   1.1  // to choose what repository and what repository interface to use.
 49            // It includes both, since there's nothing to be saved by splitting them.
 50            // Anything that the client or repository interface throws gets passed
 51            // to the cimmofParser level, which is equipped to handle the exceptions
 52            //
 53            
 54            #ifndef CIMMOF_REPOSITORY_INTERFACE_H_
 55            #define CIMMOF_REPOSITORY_INTERFACE_H_
 56            
 57 kumpf 1.2  #include <Pegasus/Common/Config.h>
 58 kumpf 1.6  #include <Pegasus/Common/CIMName.h>
 59 bob   1.1  #include <Pegasus/Common/String.h>
 60 kumpf 1.5  #include <Pegasus/Compiler/Linkage.h>
 61 bob   1.1  #include "mofCompilerOptions.h"
 62 jim.wunderlich 1.11 #include <Pegasus/Repository/CIMRepository.h>
 63 bob            1.1  
 64                     PEGASUS_NAMESPACE_BEGIN
 65                     
 66                     // Forward declarations
 67                     class cimmofRepository;
 68                     class cimmofClient;
 69 mike           1.16 class cimmofMRR;
 70 bob            1.1  class CIMClass;
 71                     class CIMQualifierDecl;
 72                     class CIMInstance;
 73                     
 74 karl           1.15 class PEGASUS_COMPILER_LINKAGE cimmofRepositoryInterface
 75                     {
 76                         private:
 77                             cimmofRepository *_repository;
 78                             cimmofClient        *_client;
 79 mike           1.16         cimmofMRR* _mrr;
 80 karl           1.15         compilerCommonDefs::operationType _ot;
 81                         public:
 82                             enum _repositoryType
 83                             {
 84                                 REPOSITORY_INTERFACE_LOCAL = 0,
 85 mike           1.16             REPOSITORY_INTERFACE_CLIENT = 1,
 86                                 REPOSITORY_INTERFACE_MRR = 2,
 87 karl           1.15         };
 88                             cimmofRepositoryInterface();
 89                             virtual ~cimmofRepositoryInterface();
 90                             void init(_repositoryType type, String location, Uint32 mode,
 91 mike           1.16                 compilerCommonDefs::operationType ot, bool descriptions);
 92 karl           1.15         Boolean ok() const
 93                             {
 94 mike           1.16             return _repository || _client || _mrr;
 95 karl           1.15         }
 96                             virtual void addClass(
 97                                     const CIMNamespaceName &nameSpace,
 98                                     CIMClass &Class) const;
 99                             virtual void addQualifier(
100                                     const CIMNamespaceName &nameSpace,
101                                     CIMQualifierDecl &qual) const;
102                             virtual void addInstance(
103                                     const CIMNamespaceName &nameSpace,
104                                     CIMInstance &instance) const;
105                             virtual CIMQualifierDecl getQualifierDecl(
106                                     const CIMNamespaceName &nameSpace,
107                                     const CIMName &qualifierName) const;
108                             virtual CIMClass getClass(
109                                     const CIMNamespaceName &nameSpace,
110                                     const CIMName &className) const;
111                             virtual void modifyClass(
112                                     const CIMNamespaceName &nameSpace,
113                                     CIMClass &Class) const;
114                             virtual void createNameSpace(const CIMNamespaceName &nameSpace) const;
115 mike           1.16         virtual void start();
116                             virtual void finish();
117 bob            1.1  };
118                     
119                     PEGASUS_NAMESPACE_END
120                     
121                     #endif
122                     
123                     
124                     
125                     

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2