2 mike 1.1 //
3 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a
6 // copy of this software and associated documentation files (the "Software"),
7 // to deal in the Software without restriction, including without limitation
8 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 // and/or sell copies of the Software, and to permit persons to whom the
10 // Software is furnished to do so, subject to the following conditions:
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 // DEALINGS IN THE SOFTWARE.
19 //
|
27 mike 1.1
28 #ifndef Pegasus_MethodRep_h
29 #define Pegasus_MethodRep_h
30
31 #include <Pegasus/Common/Config.h>
32 #include <Pegasus/Common/Exception.h>
33 #include <Pegasus/Common/String.h>
34 #include <Pegasus/Common/CIMQualifier.h>
35 #include <Pegasus/Common/CIMQualifierList.h>
36 #include <Pegasus/Common/CIMParameter.h>
37 #include <Pegasus/Common/Sharable.h>
38 #include <Pegasus/Common/Pair.h>
39
40 PEGASUS_NAMESPACE_BEGIN
41
42 class CIMMethod;
43 class CIMConstMethod;
44 class DeclContext;
45
46 class PEGASUS_COMMON_LINKAGE CIMMethodRep : public Sharable
47 {
48 mike 1.1 public:
49
50 CIMMethodRep(
51 const String& name,
52 CIMType type,
53 const String& classOrigin,
54 Boolean propagated);
55
56 ~CIMMethodRep();
57
58 virtual const String& getName() const
59 {
60 return _name;
61 }
62
63 void setName(const String& name);
64
65 CIMType getType() const
66 {
67 return _type;
68 }
69 mike 1.1
|
71 mike 1.1
72 const String& getClassOrigin() const
73 {
74 return _classOrigin;
75 }
76
77 void setClassOrigin(const String& classOrigin);
78
79 Boolean getPropagated() const
80 {
81 return _propagated;
82 }
83
84 void setPropagated(Boolean propagated)
85 {
86 _propagated = propagated;
87 }
88
89 void addQualifier(const CIMQualifier& qualifier)
90 {
91 _qualifiers.add(qualifier);
92 mike 1.1 }
93
94 Uint32 findQualifier(const String& name) const
95 {
96 return _qualifiers.find(name);
97 }
98
99 CIMQualifier getQualifier(Uint32 pos)
100 {
101 return _qualifiers.getQualifier(pos);
102 }
103
104 CIMConstQualifier getQualifier(Uint32 pos) const
105 {
106 return _qualifiers.getQualifier(pos);
107 }
108
109 Uint32 getQualifierCount() const
110 {
111 return _qualifiers.getCount();
112 }
113 mike 1.1
114 void addParameter(const CIMParameter& x);
115
116 Uint32 findParameter(const String& name);
117
118 Uint32 findParameter(const String& name) const
119 {
120 return ((CIMMethodRep*)this)->findParameter(name);
121 }
122
123 CIMParameter getParameter(Uint32 pos);
124
125 CIMConstParameter getParameter(Uint32 pos) const
126 {
127 return ((CIMMethodRep*)this)->getParameter(pos);
128 }
129
130 Uint32 getParameterCount() const;
131
132 void resolve(
133 DeclContext* declContext,
134 mike 1.1 const String& nameSpace,
135 const CIMConstMethod& method);
136
137 void resolve(
138 DeclContext* declContext,
139 const String& nameSpace);
140
141 void toXml(Array<Sint8>& out) const;
142
|