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

  1 mike  1.5 //%/////////////////////////////////////////////////////////////////////////////
  2 mike  1.1 //
  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 mike  1.5 //==============================================================================
 21 mike  1.1 //
 22 mike  1.5 // Author: Mike Brasher (mbrasher@bmc.com)
 23 mike  1.1 //
 24 mike  1.5 // Modified By:
 25 bob   1.3 //
 26 mike  1.5 //%/////////////////////////////////////////////////////////////////////////////
 27 mike  1.1 
 28           #ifndef Pegasus_MethodRep_h
 29           #define Pegasus_MethodRep_h
 30           
 31           #include <Pegasus/Common/Config.h>
 32           #include <Pegasus/Common/Exception.h>
 33           #include <Pegasus/Common/String.h>
 34           #include <Pegasus/Common/CIMQualifier.h>
 35           #include <Pegasus/Common/CIMQualifierList.h>
 36           #include <Pegasus/Common/CIMParameter.h>
 37           #include <Pegasus/Common/Sharable.h>
 38           #include <Pegasus/Common/Pair.h>
 39           
 40           PEGASUS_NAMESPACE_BEGIN
 41           
 42           class CIMMethod;
 43           class CIMConstMethod;
 44           class DeclContext;
 45           
 46           class PEGASUS_COMMON_LINKAGE CIMMethodRep : public Sharable
 47           {
 48 mike  1.1 public:
 49           
 50               CIMMethodRep(
 51           	const String& name, 
 52           	CIMType type,
 53           	const String& classOrigin,
 54           	Boolean propagated);
 55           
 56               ~CIMMethodRep();
 57           
 58               virtual const String& getName() const 
 59               { 
 60           	return _name; 
 61               }
 62           
 63               void setName(const String& name);
 64           
 65               CIMType getType() const 
 66               {
 67           	return _type; 
 68               }
 69 mike  1.1 
 70 mike  1.6     void setType(CIMType type);
 71 mike  1.1 
 72               const String& getClassOrigin() const
 73               {
 74           	return _classOrigin;
 75               }
 76           
 77               void setClassOrigin(const String& classOrigin);
 78           
 79               Boolean getPropagated() const 
 80               { 
 81           	return _propagated; 
 82               }
 83           
 84               void setPropagated(Boolean propagated) 
 85               { 
 86           	_propagated = propagated; 
 87               }
 88           
 89               void addQualifier(const CIMQualifier& qualifier)
 90               {
 91           	_qualifiers.add(qualifier);
 92 mike  1.1     }
 93 karl  1.8     // ATTN: ks 18 May.  Why no non-const version here
 94 mike  1.1     Uint32 findQualifier(const String& name) const
 95               {
 96           	return _qualifiers.find(name);
 97               }
 98 karl  1.8     // ATTN: ks 19 May.  Should this be here on in CPP.
 99               Boolean existsQualifier(const String& name) const
100               {
101           	return (findQualifier(name) != -1) ? true : false;
102               }
103 mike  1.1 
104               CIMQualifier getQualifier(Uint32 pos)
105               {
106           	return _qualifiers.getQualifier(pos);
107               }
108           
109 karl  1.8         
110 mike  1.1     CIMConstQualifier getQualifier(Uint32 pos) const
111               {
112           	return _qualifiers.getQualifier(pos);
113               }
114 karl  1.8     // ks 18 may 2001
115               void removeQualifier(Uint32 pos)
116               {
117           	_qualifiers.removeQualifier(pos);
118               }
119           
120 mike  1.1 
121               Uint32 getQualifierCount() const
122               {
123           	return _qualifiers.getCount();
124               }
125           
126               void addParameter(const CIMParameter& x);
127           
128               Uint32 findParameter(const String& name);
129           
130               Uint32 findParameter(const String& name) const
131               {
132           	return ((CIMMethodRep*)this)->findParameter(name);
133               }
134           
135               CIMParameter getParameter(Uint32 pos);
136           
137               CIMConstParameter getParameter(Uint32 pos) const
138               {
139           	return ((CIMMethodRep*)this)->getParameter(pos);
140               }
141 mike  1.1 
142               Uint32 getParameterCount() const;
143           
144               void resolve(
145           	DeclContext* declContext, 
146           	const String& nameSpace,
147           	const CIMConstMethod& method);
148           
149               void resolve(
150           	DeclContext* declContext,
151           	const String& nameSpace);
152           
153               void toXml(Array<Sint8>& out) const;
154           
155 mike  1.7     virtual void print(PEGASUS_STD(ostream)& os = PEGASUS_STD(cout)) const;
156 mike  1.1 
157               Boolean identical(const CIMMethodRep* x) const;
158           
159               CIMMethodRep* clone() const
160               {
161           	return new CIMMethodRep(*this);
162               }
163           
164           private:
165           
166               CIMMethodRep();
167           
168               CIMMethodRep(const CIMMethodRep& x);
169           
170               CIMMethodRep& operator=(const CIMMethodRep& x);
171           
172               String _name;
173               CIMType _type;
174               String _classOrigin;
175               Boolean _propagated;
176               CIMQualifierList _qualifiers;
177 mike  1.1     Array<CIMParameter> _parameters;
178           
179               friend class CIMClassRep;
180           };
181           
182           PEGASUS_NAMESPACE_END
183           
184           #endif /* Pegasus_MethodRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2