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