(file) Return to CIMMethodRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 mike  1.1 //BEGIN_LICENSE
  2           //
  3           // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
  4           //
  5           // Permission is hereby granted, free of charge, to any person obtaining a
  6           // copy of this software and associated documentation files (the "Software"),
  7           // to deal in the Software without restriction, including without limitation
  8           // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9           // and/or sell copies of the Software, and to permit persons to whom the
 10           // Software is furnished to do so, subject to the following conditions:
 11           //
 12           // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 13           // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 14           // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 15           // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 16           // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 17           // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 18           // DEALINGS IN THE SOFTWARE.
 19           //
 20           //END_LICENSE
 21           //BEGIN_HISTORY
 22 mike  1.1 //
 23           // Author:
 24           //
 25           // $Log: CIMMethodRep.h,v $
 26 bob   1.3 // Revision 1.2  2001/02/19 01:47:16  mike
 27           // Renamed names of the form CIMConst to ConstCIM.
 28           //
 29 mike  1.2 // Revision 1.1  2001/02/18 18:39:06  mike
 30           // new
 31           //
 32 mike  1.1 // Revision 1.2  2001/02/18 03:56:01  mike
 33 mike  1.2 // Changed more class names (e.g., ConstClassDecl -> ConstCIMClass)
 34 mike  1.1 //
 35           // Revision 1.1  2001/02/16 02:07:06  mike
 36           // Renamed many classes and headers (using new CIM prefixes).
 37           //
 38           // Revision 1.1.1.1  2001/01/14 19:52:58  mike
 39           // Pegasus import
 40           //
 41           //
 42           //END_HISTORY
 43           
 44           #ifndef Pegasus_MethodRep_h
 45           #define Pegasus_MethodRep_h
 46           
 47           #include <Pegasus/Common/Config.h>
 48           #include <Pegasus/Common/Exception.h>
 49           #include <Pegasus/Common/String.h>
 50           #include <Pegasus/Common/CIMQualifier.h>
 51           #include <Pegasus/Common/CIMQualifierList.h>
 52           #include <Pegasus/Common/CIMParameter.h>
 53           #include <Pegasus/Common/Sharable.h>
 54           #include <Pegasus/Common/Pair.h>
 55 mike  1.1 
 56           PEGASUS_NAMESPACE_BEGIN
 57           
 58           class CIMMethod;
 59           class CIMConstMethod;
 60           class DeclContext;
 61           
 62           class PEGASUS_COMMON_LINKAGE CIMMethodRep : public Sharable
 63           {
 64           public:
 65           
 66               CIMMethodRep(
 67           	const String& name, 
 68           	CIMType type,
 69           	const String& classOrigin,
 70           	Boolean propagated);
 71           
 72               ~CIMMethodRep();
 73           
 74               virtual const String& getName() const 
 75               { 
 76 mike  1.1 	return _name; 
 77               }
 78           
 79               void setName(const String& name);
 80           
 81               CIMType getType() const 
 82               {
 83           	return _type; 
 84               }
 85           
 86               void setType(CIMType type)
 87               {
 88           	_type = type; 
 89           
 90           	if (type == CIMType::NONE)
 91           	    throw NullType();
 92               }
 93           
 94               const String& getClassOrigin() const
 95               {
 96           	return _classOrigin;
 97 mike  1.1     }
 98           
 99               void setClassOrigin(const String& classOrigin);
100           
101               Boolean getPropagated() const 
102               { 
103           	return _propagated; 
104               }
105           
106               void setPropagated(Boolean propagated) 
107               { 
108           	_propagated = propagated; 
109               }
110           
111               void addQualifier(const CIMQualifier& qualifier)
112               {
113           	_qualifiers.add(qualifier);
114               }
115           
116               Uint32 findQualifier(const String& name) const
117               {
118 mike  1.1 	return _qualifiers.find(name);
119               }
120           
121               CIMQualifier getQualifier(Uint32 pos)
122               {
123           	return _qualifiers.getQualifier(pos);
124               }
125           
126               CIMConstQualifier getQualifier(Uint32 pos) const
127               {
128           	return _qualifiers.getQualifier(pos);
129               }
130           
131               Uint32 getQualifierCount() const
132               {
133           	return _qualifiers.getCount();
134               }
135           
136               void addParameter(const CIMParameter& x);
137           
138               Uint32 findParameter(const String& name);
139 mike  1.1 
140               Uint32 findParameter(const String& name) const
141               {
142           	return ((CIMMethodRep*)this)->findParameter(name);
143               }
144           
145               CIMParameter getParameter(Uint32 pos);
146           
147               CIMConstParameter getParameter(Uint32 pos) const
148               {
149           	return ((CIMMethodRep*)this)->getParameter(pos);
150               }
151           
152               Uint32 getParameterCount() const;
153           
154               void resolve(
155           	DeclContext* declContext, 
156           	const String& nameSpace,
157           	const CIMConstMethod& method);
158           
159               void resolve(
160 mike  1.1 	DeclContext* declContext,
161           	const String& nameSpace);
162           
163               void toXml(Array<Sint8>& out) const;
164           
165 bob   1.3     virtual void print(std::ostream &o=std::cout) const;
166 mike  1.1 
167               Boolean identical(const CIMMethodRep* x) const;
168           
169               CIMMethodRep* clone() const
170               {
171           	return new CIMMethodRep(*this);
172               }
173           
174           private:
175           
176               CIMMethodRep();
177           
178               CIMMethodRep(const CIMMethodRep& x);
179           
180               CIMMethodRep& operator=(const CIMMethodRep& x);
181           
182               String _name;
183               CIMType _type;
184               String _classOrigin;
185               Boolean _propagated;
186               CIMQualifierList _qualifiers;
187 mike  1.1     Array<CIMParameter> _parameters;
188           
189               friend class CIMClassRep;
190           };
191           
192           PEGASUS_NAMESPACE_END
193           
194           #endif /* Pegasus_MethodRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2