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.13 //
|
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 // Author: Bob Blair (bblair@bmc.com)
33 //
|
34 kumpf 1.6 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
35 // (carolann_graves@hp.com)
|
36 gerarda 1.7 // Gerarda Marquez (gmarquez@us.ibm.com)
37 // -- PEP 43 changes
|
38 bob 1.1 //
39 //%/////////////////////////////////////////////////////////////////////////////
40 //
41 // This class is the interface between the cimmof compiler, in its various
42 // forms, and the various Pegasus repository interfaces which as the
43 // time this class was created were CIMRepository and CIMClient.
44 //
45 // This class supports only the operations that the compiler needs, which
46 // are
47 // addClass()
48 // addInstance()
49 // addQualifier()
50 // createNameSpace()
51 //
52 // If we create compiler-like tools to do mass changes to the repository,
53 // then I expect that we will add methods to deal with the modification.
54 // This class is intended to be very light, basically making it easy
55 // to choose what repository and what repository interface to use.
56 // It includes both, since there's nothing to be saved by splitting them.
57 // Anything that the client or repository interface throws gets passed
58 // to the cimmofParser level, which is equipped to handle the exceptions
59 bob 1.1 //
60
61 #ifndef CIMMOF_REPOSITORY_INTERFACE_H_
62 #define CIMMOF_REPOSITORY_INTERFACE_H_
63
|
64 kumpf 1.2 #include <Pegasus/Common/Config.h>
|
65 kumpf 1.6 #include <Pegasus/Common/CIMName.h>
|
66 bob 1.1 #include <Pegasus/Common/String.h>
|
67 kumpf 1.5 #include <Pegasus/Compiler/Linkage.h>
|
68 bob 1.1 #include "mofCompilerOptions.h"
|
69 jim.wunderlich 1.11 #include <Pegasus/Repository/CIMRepository.h>
|
70 bob 1.1
71 PEGASUS_NAMESPACE_BEGIN
72
73 // Forward declarations
74 class cimmofRepository;
75 class cimmofClient;
76 class CIMClass;
77 class CIMQualifierDecl;
78 class CIMInstance;
79
80 class PEGASUS_COMPILER_LINKAGE cimmofRepositoryInterface {
81 private:
82 cimmofRepository *_repository;
83 cimmofClient *_client;
84 compilerCommonDefs::operationType _ot;
85 public:
86 enum _repositoryType { REPOSITORY_INTERFACE_LOCAL = 0,
87 REPOSITORY_INTERFACE_CLIENT
88 };
89 cimmofRepositoryInterface();
|
90 kumpf 1.3 virtual ~cimmofRepositoryInterface();
|
91 r.kieninger 1.12 void init(_repositoryType type, String location, const CIMRepository_Mode Mode,
|
92 bob 1.1 compilerCommonDefs::operationType ot);
93 Boolean ok() const { return _repository || _client; }
|
94 kumpf 1.6 virtual void addClass(
|
95 r.kieninger 1.12 const CIMNamespaceName &nameSpace,
|
96 kumpf 1.6 CIMClass &Class) const;
97 virtual void addQualifier(
|
98 r.kieninger 1.12 const CIMNamespaceName &nameSpace,
|
99 kumpf 1.6 CIMQualifierDecl &qual) const;
100 virtual void addInstance(
|
101 r.kieninger 1.12 const CIMNamespaceName &nameSpace,
|
102 kumpf 1.6 CIMInstance &instance) const;
103 virtual CIMQualifierDecl getQualifierDecl(
104 const CIMNamespaceName &nameSpace,
105 const CIMName &qualifierName) const;
106 virtual CIMClass getClass(
|
107 r.kieninger 1.12 const CIMNamespaceName &nameSpace,
|
108 kumpf 1.6 const CIMName &className) const;
|
109 gerarda 1.7 virtual void modifyClass(
|
110 r.kieninger 1.12 const CIMNamespaceName &nameSpace,
|
111 gerarda 1.7 CIMClass &Class) const;
|
112 kumpf 1.6 virtual void createNameSpace(const CIMNamespaceName &nameSpace) const;
|
113 bob 1.1 };
114
115 PEGASUS_NAMESPACE_END
116
117 #endif
118
119
120
121
|