(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           // Revision 1.2  2001/02/18 03:56:01  mike
 27           // Changed more class names (e.g., ConstClassDecl -> CIMConstClass)
 28           //
 29           // Revision 1.1  2001/02/16 02:07:06  mike
 30           // Renamed many classes and headers (using new CIM prefixes).
 31           //
 32           // Revision 1.1.1.1  2001/01/14 19:52:58  mike
 33           // Pegasus import
 34           //
 35           //
 36           //END_HISTORY
 37           
 38           #ifndef Pegasus_MethodRep_h
 39           #define Pegasus_MethodRep_h
 40           
 41           #include <Pegasus/Common/Config.h>
 42           #include <Pegasus/Common/Exception.h>
 43 mike  1.1 #include <Pegasus/Common/String.h>
 44           #include <Pegasus/Common/CIMQualifier.h>
 45           #include <Pegasus/Common/CIMQualifierList.h>
 46           #include <Pegasus/Common/CIMParameter.h>
 47           #include <Pegasus/Common/Sharable.h>
 48           #include <Pegasus/Common/Pair.h>
 49           
 50           PEGASUS_NAMESPACE_BEGIN
 51           
 52           class CIMMethod;
 53           class CIMConstMethod;
 54           class DeclContext;
 55           
 56           class PEGASUS_COMMON_LINKAGE CIMMethodRep : public Sharable
 57           {
 58           public:
 59           
 60               CIMMethodRep(
 61           	const String& name, 
 62           	CIMType type,
 63           	const String& classOrigin,
 64 mike  1.1 	Boolean propagated);
 65           
 66               ~CIMMethodRep();
 67           
 68               virtual const String& getName() const 
 69               { 
 70           	return _name; 
 71               }
 72           
 73               void setName(const String& name);
 74           
 75               CIMType getType() const 
 76               {
 77           	return _type; 
 78               }
 79           
 80               void setType(CIMType type)
 81               {
 82           	_type = type; 
 83           
 84           	if (type == CIMType::NONE)
 85 mike  1.1 	    throw NullType();
 86               }
 87           
 88               const String& getClassOrigin() const
 89               {
 90           	return _classOrigin;
 91               }
 92           
 93               void setClassOrigin(const String& classOrigin);
 94           
 95               Boolean getPropagated() const 
 96               { 
 97           	return _propagated; 
 98               }
 99           
100               void setPropagated(Boolean propagated) 
101               { 
102           	_propagated = propagated; 
103               }
104           
105               void addQualifier(const CIMQualifier& qualifier)
106 mike  1.1     {
107           	_qualifiers.add(qualifier);
108               }
109           
110               Uint32 findQualifier(const String& name) const
111               {
112           	return _qualifiers.find(name);
113               }
114           
115               CIMQualifier getQualifier(Uint32 pos)
116               {
117           	return _qualifiers.getQualifier(pos);
118               }
119           
120               CIMConstQualifier getQualifier(Uint32 pos) const
121               {
122           	return _qualifiers.getQualifier(pos);
123               }
124           
125               Uint32 getQualifierCount() const
126               {
127 mike  1.1 	return _qualifiers.getCount();
128               }
129           
130               void addParameter(const CIMParameter& x);
131           
132               Uint32 findParameter(const String& name);
133           
134               Uint32 findParameter(const String& name) const
135               {
136           	return ((CIMMethodRep*)this)->findParameter(name);
137               }
138           
139               CIMParameter getParameter(Uint32 pos);
140           
141               CIMConstParameter getParameter(Uint32 pos) const
142               {
143           	return ((CIMMethodRep*)this)->getParameter(pos);
144               }
145           
146               Uint32 getParameterCount() const;
147           
148 mike  1.1     void resolve(
149           	DeclContext* declContext, 
150           	const String& nameSpace,
151           	const CIMConstMethod& method);
152           
153               void resolve(
154           	DeclContext* declContext,
155           	const String& nameSpace);
156           
157               void toXml(Array<Sint8>& out) const;
158           
159               virtual void print() const;
160           
161               Boolean identical(const CIMMethodRep* x) const;
162           
163               CIMMethodRep* clone() const
164               {
165           	return new CIMMethodRep(*this);
166               }
167           
168           private:
169 mike  1.1 
170               CIMMethodRep();
171           
172               CIMMethodRep(const CIMMethodRep& x);
173           
174               CIMMethodRep& operator=(const CIMMethodRep& x);
175           
176               String _name;
177               CIMType _type;
178               String _classOrigin;
179               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 */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2