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