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

  1 karl  1.33 //%2006////////////////////////////////////////////////////////////////////////
  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 karl  1.31 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.33 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.15 //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 kumpf 1.21 // of this software and associated documentation files (the "Software"), to
 16            // deal in the Software without restriction, including without limitation the
 17            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18 mike  1.15 // sell copies of the Software, and to permit persons to whom the Software is
 19            // furnished to do so, subject to the following conditions:
 20            // 
 21 kumpf 1.21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.15 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24 kumpf 1.21 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27 mike  1.15 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29            //
 30            //==============================================================================
 31            //
 32            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_MethodRep_h
 35            #define Pegasus_MethodRep_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 kumpf 1.24 #include <Pegasus/Common/Linkage.h>
 39 marek 1.35.18.1 #include <Pegasus/Common/Constants.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 marek 1.35.18.1 #include <Pegasus/Common/CIMParameterRep.h>
 47 mike  1.15      #include <Pegasus/Common/Sharable.h>
 48                 #include <Pegasus/Common/Pair.h>
 49 marek 1.35.18.1 #include <Pegasus/Common/OrderedSet.h>
 50 mike  1.15      
 51                 PEGASUS_NAMESPACE_BEGIN
 52                 
 53                 class CIMConstMethod;
 54                 class DeclContext;
 55                 
 56 mike  1.34      class CIMMethodRep : public Sharable
 57 mike  1.15      {
 58                 public:
 59                 
 60                     CIMMethodRep(
 61 kumpf 1.35              const CIMName& name,
 62                         CIMType type,
 63                         const CIMName& classOrigin,
 64                         Boolean propagated);
 65 mike  1.15      
 66                     ~CIMMethodRep();
 67                 
 68 kumpf 1.24          virtual const CIMName& getName() const
 69 mike  1.15          {
 70 kumpf 1.35              return _name;
 71 mike  1.15          }
 72                 
 73 marek 1.35.18.1     const Uint32 getNameTag() const
 74                     {
 75                         return _nameTag;
 76                     }
 77                 
 78                     void increaseOwnerCount()
 79                     {
 80                         _ownerCount++;
 81                         return;
 82                     }
 83                 
 84                     void decreaseOwnerCount()
 85                     {
 86                         _ownerCount++;
 87                         return;
 88                     }
 89                     
 90 kumpf 1.24          void setName(const CIMName& name);
 91 mike  1.15      
 92                     CIMType getType() const
 93                     {
 94 kumpf 1.35              return _type;
 95 mike  1.15          }
 96                 
 97                     void setType(CIMType type);
 98                 
 99 kumpf 1.24          const CIMName& getClassOrigin() const
100 mike  1.15          {
101 kumpf 1.35              return _classOrigin;
102 mike  1.15          }
103                 
104 kumpf 1.24          void setClassOrigin(const CIMName& classOrigin);
105 mike  1.15      
106                     Boolean getPropagated() const
107                     {
108 kumpf 1.35              return _propagated;
109 mike  1.15          }
110                 
111                     void setPropagated(Boolean propagated)
112                     {
113 kumpf 1.35              _propagated = propagated;
114 mike  1.15          }
115                 
116                     void addQualifier(const CIMQualifier& qualifier)
117                     {
118 kumpf 1.35              _qualifiers.add(qualifier);
119 mike  1.15          }
120 kumpf 1.18      
121 kumpf 1.24          Uint32 findQualifier(const CIMName& name) const
122 mike  1.15          {
123 kumpf 1.35              return _qualifiers.find(name);
124 mike  1.15          }
125                 
126 kumpf 1.27          CIMQualifier getQualifier(Uint32 index)
127 mike  1.15          {
128 kumpf 1.35              return _qualifiers.getQualifier(index);
129 mike  1.15          }
130                 
131                 
132 kumpf 1.27          CIMConstQualifier getQualifier(Uint32 index) const
133 mike  1.15          {
134 kumpf 1.35              return _qualifiers.getQualifier(index);
135 mike  1.15          }
136 kumpf 1.18      
137 kumpf 1.27          void removeQualifier(Uint32 index)
138 mike  1.15          {
139 kumpf 1.35              _qualifiers.removeQualifier(index);
140 mike  1.15          }
141                 
142                 
143                     Uint32 getQualifierCount() const
144                     {
145 kumpf 1.35              return _qualifiers.getCount();
146 mike  1.15          }
147                 
148                     void addParameter(const CIMParameter& x);
149                 
150 kumpf 1.24          Uint32 findParameter(const CIMName& name) const;
151 mike  1.15      
152 kumpf 1.27          CIMParameter getParameter(Uint32 index);
153 mike  1.15      
154 kumpf 1.27          CIMConstParameter getParameter(Uint32 index) const
155 mike  1.15          {
156 kumpf 1.35              return ((CIMMethodRep*)this)->getParameter(index);
157 mike  1.15          }
158                 
159 kumpf 1.27          void removeParameter (Uint32 index);
160 kumpf 1.25      
161 mike  1.15          Uint32 getParameterCount() const;
162                 
163                     void resolve(
164 kumpf 1.35              DeclContext* declContext,
165                         const CIMNamespaceName& nameSpace,
166                         const CIMConstMethod& method);
167 mike  1.15      
168                     void resolve(
169 kumpf 1.35              DeclContext* declContext,
170                         const CIMNamespaceName& nameSpace);
171 mike  1.15      
172 mike  1.32          void toXml(Buffer& out) const;
173 mike  1.15      
174 mike  1.32          void toMof(Buffer& out) const;
175 mike  1.16      
176 mike  1.15          Boolean identical(const CIMMethodRep* x) const;
177                 
178                     CIMMethodRep* clone() const
179                     {
180 kumpf 1.35              return new CIMMethodRep(*this);
181 mike  1.15          }
182                 
183                 private:
184                 
185                     CIMMethodRep();
186                 
187                     CIMMethodRep(const CIMMethodRep& x);
188                 
189 kumpf 1.17          // This method is declared and made private so that the compiler does
190                     // not implicitly define a default copy constructor.
191                     CIMMethodRep& operator=(const CIMMethodRep& x)
192                     {
193 kumpf 1.20              //PEGASUS_ASSERT(0);
194 kumpf 1.17              return *this;
195                     }
196 mike  1.15      
197 kumpf 1.24          CIMName _name;
198 mike  1.15          CIMType _type;
199 kumpf 1.24          CIMName _classOrigin;
200 mike  1.15          Boolean _propagated;
201                     CIMQualifierList _qualifiers;
202 marek 1.35.18.1     Uint32 _nameTag;
203                     Uint32 _ownerCount;
204                 
205                     typedef OrderedSet<CIMParameter,
206                                        CIMParameterRep,
207                                        PEGASUS_PARAMETER_ORDEREDSET_HASHSIZE> ParameterSet;
208                     ParameterSet _parameters;
209 mike  1.15      
210                     friend class CIMClassRep;
211                 };
212                 
213                 PEGASUS_NAMESPACE_END
214                 
215                 #endif /* Pegasus_MethodRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2