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