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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2