1 karl 1.33 //%2006////////////////////////////////////////////////////////////////////////
|
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 karl 1.33 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.15 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.21 // 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 mike 1.15 // 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 //
|
21 kumpf 1.21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.15 // 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.21 // 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 mike 1.15 // 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 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_MethodRep_h
35 #define Pegasus_MethodRep_h
36
37 #include <Pegasus/Common/Config.h>
|
38 kumpf 1.24 #include <Pegasus/Common/Linkage.h>
|
39 kumpf 1.26 #include <Pegasus/Common/InternalException.h>
|
40 mike 1.15 #include <Pegasus/Common/String.h>
|
41 kumpf 1.24 #include <Pegasus/Common/CIMName.h>
|
42 mike 1.15 #include <Pegasus/Common/CIMQualifier.h>
43 #include <Pegasus/Common/CIMQualifierList.h>
44 #include <Pegasus/Common/CIMParameter.h>
45 #include <Pegasus/Common/Sharable.h>
46 #include <Pegasus/Common/Pair.h>
47
48 PEGASUS_NAMESPACE_BEGIN
49
50 class CIMConstMethod;
51 class DeclContext;
52
|
53 mike 1.34 class CIMMethodRep : public Sharable
|
54 mike 1.15 {
55 public:
56
57 CIMMethodRep(
|
58 kumpf 1.35 const CIMName& name,
59 CIMType type,
60 const CIMName& classOrigin,
61 Boolean propagated);
|
62 mike 1.15
63 ~CIMMethodRep();
64
|
65 kumpf 1.24 virtual const CIMName& getName() const
|
66 mike 1.15 {
|
67 kumpf 1.35 return _name;
|
68 mike 1.15 }
69
|
70 kumpf 1.24 void setName(const CIMName& name);
|
71 mike 1.15
72 CIMType getType() const
73 {
|
74 kumpf 1.35 return _type;
|
75 mike 1.15 }
76
77 void setType(CIMType type);
78
|
79 kumpf 1.24 const CIMName& getClassOrigin() const
|
80 mike 1.15 {
|
81 kumpf 1.35 return _classOrigin;
|
82 mike 1.15 }
83
|
84 kumpf 1.24 void setClassOrigin(const CIMName& classOrigin);
|
85 mike 1.15
86 Boolean getPropagated() const
87 {
|
88 kumpf 1.35 return _propagated;
|
89 mike 1.15 }
90
91 void setPropagated(Boolean propagated)
92 {
|
93 kumpf 1.35 _propagated = propagated;
|
94 mike 1.15 }
95
96 void addQualifier(const CIMQualifier& qualifier)
97 {
|
98 kumpf 1.35 _qualifiers.add(qualifier);
|
99 mike 1.15 }
|
100 kumpf 1.18
|
101 kumpf 1.24 Uint32 findQualifier(const CIMName& name) const
|
102 mike 1.15 {
|
103 kumpf 1.35 return _qualifiers.find(name);
|
104 mike 1.15 }
105
|
106 kumpf 1.27 CIMQualifier getQualifier(Uint32 index)
|
107 mike 1.15 {
|
108 kumpf 1.35 return _qualifiers.getQualifier(index);
|
109 mike 1.15 }
110
111
|
112 kumpf 1.27 CIMConstQualifier getQualifier(Uint32 index) const
|
113 mike 1.15 {
|
114 kumpf 1.35 return _qualifiers.getQualifier(index);
|
115 mike 1.15 }
|
116 kumpf 1.18
|
117 kumpf 1.27 void removeQualifier(Uint32 index)
|
118 mike 1.15 {
|
119 kumpf 1.35 _qualifiers.removeQualifier(index);
|
120 mike 1.15 }
121
122
123 Uint32 getQualifierCount() const
124 {
|
125 kumpf 1.35 return _qualifiers.getCount();
|
126 mike 1.15 }
127
128 void addParameter(const CIMParameter& x);
129
|
130 kumpf 1.24 Uint32 findParameter(const CIMName& name) const;
|
131 mike 1.15
|
132 kumpf 1.27 CIMParameter getParameter(Uint32 index);
|
133 mike 1.15
|
134 kumpf 1.27 CIMConstParameter getParameter(Uint32 index) const
|
135 mike 1.15 {
|
136 kumpf 1.35 return ((CIMMethodRep*)this)->getParameter(index);
|
137 mike 1.15 }
138
|
139 kumpf 1.27 void removeParameter (Uint32 index);
|
140 kumpf 1.25
|
141 mike 1.15 Uint32 getParameterCount() const;
142
143 void resolve(
|
144 kumpf 1.35 DeclContext* declContext,
145 const CIMNamespaceName& nameSpace,
146 const CIMConstMethod& method);
|
147 mike 1.15
148 void resolve(
|
149 kumpf 1.35 DeclContext* declContext,
150 const CIMNamespaceName& nameSpace);
|
151 mike 1.15
|
152 mike 1.32 void toXml(Buffer& out) const;
|
153 mike 1.15
|
154 mike 1.32 void toMof(Buffer& out) const;
|
155 mike 1.16
|
156 mike 1.15 Boolean identical(const CIMMethodRep* x) const;
157
158 CIMMethodRep* clone() const
159 {
|
160 kumpf 1.35 return new CIMMethodRep(*this);
|
161 mike 1.15 }
162
163 private:
164
165 CIMMethodRep(const CIMMethodRep& x);
166
|
167 kumpf 1.36 CIMMethodRep(); // Unimplemented
168 CIMMethodRep& operator=(const CIMMethodRep& x); // Unimplemented
|
169 mike 1.15
|
170 kumpf 1.24 CIMName _name;
|
171 mike 1.15 CIMType _type;
|
172 kumpf 1.24 CIMName _classOrigin;
|
173 mike 1.15 Boolean _propagated;
174 CIMQualifierList _qualifiers;
175 Array<CIMParameter> _parameters;
176
177 friend class CIMClassRep;
178 };
179
180 PEGASUS_NAMESPACE_END
181
182 #endif /* Pegasus_MethodRep_h */
|