CIMMethod.h
1 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31 
32 #ifndef Pegasus_Method_h
33 #define Pegasus_Method_h
34 
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/Linkage.h>
37 #include <Pegasus/Common/String.h>
38 #include <Pegasus/Common/CIMName.h>
39 #include <Pegasus/Common/CIMParameter.h>
40 #include <Pegasus/Common/CIMQualifier.h>
41 #include <Pegasus/Common/CIMType.h>
42 
43 PEGASUS_NAMESPACE_BEGIN
44 
45 class Resolver;
46 class CIMConstMethod;
47 class CIMMethodRep;
48 
86 class PEGASUS_COMMON_LINKAGE CIMMethod
87 {
88 public:
89 
97  CIMMethod();
98 
112  CIMMethod(const CIMMethod& x);
113 
130  CIMMethod(
131  const CIMName& name,
132  CIMType type,
133  const CIMName& classOrigin = CIMName(),
134  Boolean propagated = false);
135 
139  ~CIMMethod();
140 
156  CIMMethod& operator=(const CIMMethod& x);
157 
169  const CIMName& getName() const;
170 
183  void setName(const CIMName& name);
184 
196  CIMType getType() const;
197 
212  void setType(CIMType type);
213 
222  const CIMName& getClassOrigin() const;
223 
233  void setClassOrigin(const CIMName& classOrigin);
234 
245  Boolean getPropagated() const;
246 
255  void setPropagated(Boolean propagated);
256 
271  CIMMethod& addQualifier(const CIMQualifier& x);
272 
286  Uint32 findQualifier(const CIMName& name) const;
287 
307  CIMQualifier getQualifier(Uint32 index);
308 
329  CIMConstQualifier getQualifier(Uint32 index) const;
330 
346  void removeQualifier(Uint32 index);
347 
361  Uint32 getQualifierCount() const;
362 
377  CIMMethod& addParameter(const CIMParameter& x);
378 
393  Uint32 findParameter(const CIMName& name) const;
394 
413  CIMParameter getParameter(Uint32 index);
414 
433  CIMConstParameter getParameter(Uint32 index) const;
434 
443  void removeParameter (Uint32 index);
444 
451  Uint32 getParameterCount() const;
452 
462  Boolean isUninitialized() const;
463 
478  Boolean identical(const CIMConstMethod& x) const;
479 
487  CIMMethod clone() const;
488 
489 private:
490 
491  CIMMethod(CIMMethodRep* rep);
492 
493  CIMMethodRep* _rep;
494  friend class CIMConstMethod;
495  friend class Resolver;
496  friend class XmlWriter;
497  friend class MofWriter;
498  friend class BinaryStreamer;
499 };
500 
508 class PEGASUS_COMMON_LINKAGE CIMConstMethod
509 {
510 public:
511 
519  CIMConstMethod();
520 
535  CIMConstMethod(const CIMConstMethod& x);
536 
551  CIMConstMethod(const CIMMethod& x);
552 
574  const CIMName& name,
575  CIMType type,
576  const CIMName& classOrigin = CIMName(),
577  Boolean propagated = false);
578 
582  ~CIMConstMethod();
583 
599  CIMConstMethod& operator=(const CIMConstMethod& x);
600 
616  CIMConstMethod& operator=(const CIMMethod& x);
617 
629  const CIMName& getName() const;
630 
642  CIMType getType() const;
643 
652  const CIMName& getClassOrigin() const;
653 
664  Boolean getPropagated() const;
665 
680  Uint32 findQualifier(const CIMName& name) const;
681 
702  CIMConstQualifier getQualifier(Uint32 index) const;
703 
718  Uint32 getQualifierCount() const;
719 
734  Uint32 findParameter(const CIMName& name) const;
735 
754  CIMConstParameter getParameter(Uint32 index) const;
755 
762  Uint32 getParameterCount() const;
763 
773  Boolean isUninitialized() const;
774 
789  Boolean identical(const CIMConstMethod& x) const;
790 
799  CIMMethod clone() const;
800 
801 private:
802 
803  CIMMethodRep* _rep;
804 
805  friend class CIMMethod;
806  friend class CIMMethodRep;
807  friend class XmlWriter;
808  friend class MofWriter;
809 };
810 
811 #define PEGASUS_ARRAY_T CIMMethod
812 # include <Pegasus/Common/ArrayInter.h>
813 #undef PEGASUS_ARRAY_T
814 
815 PEGASUS_NAMESPACE_END
816 
817 #endif /* Pegasus_Method_h */
Definition: CIMParameter.h:306
Definition: CIMQualifier.h:273
Definition: CIMQualifier.h:68
Definition: CIMName.h:64
Definition: CIMMethod.h:508
Definition: CIMMethod.h:86
Definition: CIMParameter.h:77