1 karl 1.29 //%2004////////////////////////////////////////////////////////////////////////
|
2 mike 1.15 //
|
3 karl 1.29 // 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.28 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.29 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 mike 1.15 //
10 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 kumpf 1.21 // of this software and associated documentation files (the "Software"), to
12 // deal in the Software without restriction, including without limitation the
13 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
14 mike 1.15 // sell copies of the Software, and to permit persons to whom the Software is
15 // furnished to do so, subject to the following conditions:
16 //
|
17 kumpf 1.21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
18 mike 1.15 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
19 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
20 kumpf 1.21 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
23 mike 1.15 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 //
26 //==============================================================================
27 //
28 // Author: Mike Brasher (mbrasher@bmc.com)
29 //
|
30 kumpf 1.22 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
|
31 david.dillard 1.30 // (carolann_graves@hp.com)
32 // David Dillard, VERITAS Software Corp.
33 // (david.dillard@veritas.com)
|
34 mike 1.15 //
35 //%/////////////////////////////////////////////////////////////////////////////
36
37 #ifndef Pegasus_MethodRep_h
38 #define Pegasus_MethodRep_h
39
40 #include <Pegasus/Common/Config.h>
|
41 kumpf 1.24 #include <Pegasus/Common/Linkage.h>
|
42 kumpf 1.26 #include <Pegasus/Common/InternalException.h>
|
43 mike 1.15 #include <Pegasus/Common/String.h>
|
44 kumpf 1.24 #include <Pegasus/Common/CIMName.h>
|
45 mike 1.15 #include <Pegasus/Common/CIMQualifier.h>
46 #include <Pegasus/Common/CIMQualifierList.h>
47 #include <Pegasus/Common/CIMParameter.h>
48 #include <Pegasus/Common/Sharable.h>
49 #include <Pegasus/Common/Pair.h>
50
51 PEGASUS_NAMESPACE_BEGIN
52
53 class CIMConstMethod;
54 class DeclContext;
55
56 class PEGASUS_COMMON_LINKAGE CIMMethodRep : public Sharable
57 {
58 public:
59
60 CIMMethodRep(
|
61 kumpf 1.24 const CIMName& name,
|
62 mike 1.15 CIMType type,
|
63 kumpf 1.24 const CIMName& classOrigin,
|
64 mike 1.15 Boolean propagated);
65
66 ~CIMMethodRep();
67
|
68 kumpf 1.24 virtual const CIMName& getName() const
|
69 mike 1.15 {
70 return _name;
71 }
72
|
73 kumpf 1.24 void setName(const CIMName& name);
|
74 mike 1.15
75 CIMType getType() const
76 {
77 return _type;
78 }
79
80 void setType(CIMType type);
81
|
82 kumpf 1.24 const CIMName& getClassOrigin() const
|
83 mike 1.15 {
84 return _classOrigin;
85 }
86
|
87 kumpf 1.24 void setClassOrigin(const CIMName& classOrigin);
|
88 mike 1.15
89 Boolean getPropagated() const
90 {
91 return _propagated;
92 }
93
94 void setPropagated(Boolean propagated)
95 {
96 _propagated = propagated;
97 }
98
99 void addQualifier(const CIMQualifier& qualifier)
100 {
101 _qualifiers.add(qualifier);
102 }
|
103 kumpf 1.18
|
104 kumpf 1.24 Uint32 findQualifier(const CIMName& name) const
|
105 mike 1.15 {
106 return _qualifiers.find(name);
107 }
108
|
109 kumpf 1.27 CIMQualifier getQualifier(Uint32 index)
|
110 mike 1.15 {
|
111 kumpf 1.27 return _qualifiers.getQualifier(index);
|
112 mike 1.15 }
113
114
|
115 kumpf 1.27 CIMConstQualifier getQualifier(Uint32 index) const
|
116 mike 1.15 {
|
117 kumpf 1.27 return _qualifiers.getQualifier(index);
|
118 mike 1.15 }
|
119 kumpf 1.18
|
120 kumpf 1.27 void removeQualifier(Uint32 index)
|
121 mike 1.15 {
|
122 kumpf 1.27 _qualifiers.removeQualifier(index);
|
123 mike 1.15 }
124
125
126 Uint32 getQualifierCount() const
127 {
128 return _qualifiers.getCount();
129 }
130
131 void addParameter(const CIMParameter& x);
132
|
133 kumpf 1.24 Uint32 findParameter(const CIMName& name) const;
|
134 mike 1.15
|
135 kumpf 1.27 CIMParameter getParameter(Uint32 index);
|
136 mike 1.15
|
137 kumpf 1.27 CIMConstParameter getParameter(Uint32 index) const
|
138 mike 1.15 {
|
139 kumpf 1.27 return ((CIMMethodRep*)this)->getParameter(index);
|
140 mike 1.15 }
141
|
142 kumpf 1.27 void removeParameter (Uint32 index);
|
143 kumpf 1.25
|
144 mike 1.15 Uint32 getParameterCount() const;
145
146 void resolve(
147 DeclContext* declContext,
|
148 kumpf 1.24 const CIMNamespaceName& nameSpace,
|
149 mike 1.15 const CIMConstMethod& method);
150
151 void resolve(
152 DeclContext* declContext,
|
153 kumpf 1.24 const CIMNamespaceName& nameSpace);
|
154 mike 1.15
|
155 david.dillard 1.30 void toXml(Array<char>& out) const;
|
156 mike 1.15
|
157 david.dillard 1.30 void toMof(Array<char>& out) const;
|
158 mike 1.16
|
159 mike 1.15 Boolean identical(const CIMMethodRep* x) const;
160
161 CIMMethodRep* clone() const
162 {
163 return new CIMMethodRep(*this);
164 }
165
166 private:
167
168 CIMMethodRep();
169
170 CIMMethodRep(const CIMMethodRep& x);
171
|
172 kumpf 1.17 // This method is declared and made private so that the compiler does
173 // not implicitly define a default copy constructor.
174 CIMMethodRep& operator=(const CIMMethodRep& x)
175 {
|
176 kumpf 1.20 //PEGASUS_ASSERT(0);
|
177 kumpf 1.17 return *this;
178 }
|
179 mike 1.15
|
180 kumpf 1.24 CIMName _name;
|
181 mike 1.15 CIMType _type;
|
182 kumpf 1.24 CIMName _classOrigin;
|
183 mike 1.15 Boolean _propagated;
184 CIMQualifierList _qualifiers;
185 Array<CIMParameter> _parameters;
186
187 friend class CIMClassRep;
188 };
189
190 PEGASUS_NAMESPACE_END
191
192 #endif /* Pegasus_MethodRep_h */
|