(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 mday  1.27.2.1 #include <Pegasus/Common/Exception.h>
 36 mike  1.15     #include <Pegasus/Common/String.h>
 37                #include <Pegasus/Common/CIMQualifier.h>
 38                #include <Pegasus/Common/CIMQualifierList.h>
 39                #include <Pegasus/Common/CIMParameter.h>
 40                #include <Pegasus/Common/Sharable.h>
 41                #include <Pegasus/Common/Pair.h>
 42 mday  1.27.2.1 #include <Pegasus/Common/Linkage.h>
 43 mike  1.15     
 44                PEGASUS_NAMESPACE_BEGIN
 45                
 46                class CIMConstMethod;
 47                class DeclContext;
 48                
 49                class PEGASUS_COMMON_LINKAGE CIMMethodRep : public Sharable
 50                {
 51                public:
 52                
 53                    CIMMethodRep(
 54 mday  1.27.2.1 	const String& name,
 55 mike  1.15     	CIMType type,
 56 mday  1.27.2.1 	const String& classOrigin,
 57 mike  1.15     	Boolean propagated);
 58                
 59                    ~CIMMethodRep();
 60                
 61 mday  1.27.2.1     virtual const String& getName() const
 62 mike  1.15         {
 63                	return _name;
 64                    }
 65                
 66 mday  1.27.2.1     void setName(const String& name);
 67 mike  1.15     
 68                    CIMType getType() const
 69                    {
 70                	return _type;
 71                    }
 72                
 73                    void setType(CIMType type);
 74                
 75 mday  1.27.2.1     const String& getClassOrigin() const
 76 mike  1.15         {
 77                	return _classOrigin;
 78                    }
 79                
 80 mday  1.27.2.1     void setClassOrigin(const String& classOrigin);
 81 mike  1.15     
 82                    Boolean getPropagated() const
 83                    {
 84                	return _propagated;
 85                    }
 86                
 87                    void setPropagated(Boolean propagated)
 88                    {
 89                	_propagated = propagated;
 90                    }
 91                
 92                    void addQualifier(const CIMQualifier& qualifier)
 93                    {
 94                	_qualifiers.add(qualifier);
 95                    }
 96 kumpf 1.18     
 97 mday  1.27.2.1     Uint32 findQualifier(const String& name) const
 98 mike  1.15         {
 99                	return _qualifiers.find(name);
100                    }
101                
102 mday  1.27.2.1     CIMQualifier getQualifier(Uint32 pos)
103 mike  1.15         {
104 mday  1.27.2.1 	return _qualifiers.getQualifier(pos);
105 mike  1.15         }
106                
107                
108 mday  1.27.2.1     CIMConstQualifier getQualifier(Uint32 pos) const
109 mike  1.15         {
110 mday  1.27.2.1 	return _qualifiers.getQualifier(pos);
111 mike  1.15         }
112 kumpf 1.18     
113 mday  1.27.2.1     void removeQualifier(Uint32 pos)
114 mike  1.15         {
115 mday  1.27.2.1 	_qualifiers.removeQualifier(pos);
116 mike  1.15         }
117                
118                
119                    Uint32 getQualifierCount() const
120                    {
121                	return _qualifiers.getCount();
122                    }
123                
124                    void addParameter(const CIMParameter& x);
125                
126 mday  1.27.2.1     Uint32 findParameter(const String& name) const;
127 mike  1.15     
128 mday  1.27.2.1     CIMParameter getParameter(Uint32 pos);
129 mike  1.15     
130 mday  1.27.2.1     CIMConstParameter getParameter(Uint32 pos) const
131 mike  1.15         {
132 mday  1.27.2.1 	return ((CIMMethodRep*)this)->getParameter(pos);
133 mike  1.15         }
134                
135                    Uint32 getParameterCount() const;
136                
137                    void resolve(
138                	DeclContext* declContext,
139 mday  1.27.2.1 	const String& nameSpace,
140 mike  1.15     	const CIMConstMethod& method);
141                
142                    void resolve(
143                	DeclContext* declContext,
144 mday  1.27.2.1 	const String& nameSpace);
145 mike  1.15     
146                    void toXml(Array<Sint8>& out) const;
147                
148 mike  1.16         void toMof(Array<Sint8>& out) const;
149                
150 mike  1.15         Boolean identical(const CIMMethodRep* x) const;
151                
152                    CIMMethodRep* clone() const
153                    {
154                	return new CIMMethodRep(*this);
155                    }
156                
157                private:
158                
159                    CIMMethodRep();
160                
161                    CIMMethodRep(const CIMMethodRep& x);
162                
163 kumpf 1.17         // This method is declared and made private so that the compiler does
164                    // not implicitly define a default copy constructor.
165                    CIMMethodRep& operator=(const CIMMethodRep& x)
166                    {
167 kumpf 1.20             //PEGASUS_ASSERT(0);
168 kumpf 1.17             return *this;
169                    }
170 mike  1.15     
171 mday  1.27.2.1     String _name;
172 mike  1.15         CIMType _type;
173 mday  1.27.2.1     String _classOrigin;
174 mike  1.15         Boolean _propagated;
175                    CIMQualifierList _qualifiers;
176                    Array<CIMParameter> _parameters;
177                
178                    friend class CIMClassRep;
179                };
180                
181                PEGASUS_NAMESPACE_END
182                
183                #endif /* Pegasus_MethodRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2