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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2