1 karl 1.32 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.14 //
|
3 karl 1.28 // 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.27 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.28 // 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.30 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.32 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.14 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.20 // 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.14 // 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.20 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.14 // 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.20 // 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.14 // 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_PropertyRep_h
35 #define Pegasus_PropertyRep_h
36
37 #include <Pegasus/Common/Config.h>
|
38 kumpf 1.25 #include <Pegasus/Common/InternalException.h>
|
39 mike 1.14 #include <Pegasus/Common/String.h>
|
40 kumpf 1.23 #include <Pegasus/Common/CIMName.h>
|
41 mike 1.14 #include <Pegasus/Common/CIMValue.h>
42 #include <Pegasus/Common/CIMQualifier.h>
43 #include <Pegasus/Common/CIMQualifierList.h>
44 #include <Pegasus/Common/Sharable.h>
|
45 kumpf 1.22 #include <Pegasus/Common/Linkage.h>
|
46 mike 1.14
47 PEGASUS_NAMESPACE_BEGIN
48
49 class CIMClassRep;
50 class CIMProperty;
51 class CIMConstProperty;
52 class DeclContext;
53
|
54 mike 1.34 class CIMPropertyRep : public Sharable
|
55 mike 1.14 {
56 public:
57
58 CIMPropertyRep(
|
59 kumpf 1.35 const CIMName& name,
60 const CIMValue& value,
61 Uint32 arraySize,
62 const CIMName& referenceClassName,
63 const CIMName& classOrigin,
64 Boolean propagated);
|
65 mike 1.14
66 ~CIMPropertyRep();
67
|
68 kumpf 1.23 const CIMName& getName() const
|
69 mike 1.14 {
|
70 kumpf 1.35 return _name;
|
71 mike 1.14 }
72
|
73 kumpf 1.23 void setName(const CIMName& name);
|
74 mike 1.14
75 const CIMValue& getValue() const
76 {
|
77 kumpf 1.35 return _value;
|
78 mike 1.14 }
79
80 void setValue(const CIMValue& value);
81
82 Uint32 getArraySize() const
83 {
|
84 kumpf 1.35 return _arraySize;
|
85 mike 1.14 }
86
|
87 kumpf 1.23 const CIMName& getReferenceClassName() const
|
88 mike 1.14 {
|
89 kumpf 1.35 return _referenceClassName;
|
90 mike 1.14 }
91
|
92 kumpf 1.23 const CIMName& getClassOrigin() const
|
93 mike 1.14 {
|
94 kumpf 1.35 return _classOrigin;
|
95 mike 1.14 }
96
|
97 kumpf 1.23 void setClassOrigin(const CIMName& classOrigin);
|
98 mike 1.14
99 Boolean getPropagated() const
100 {
|
101 kumpf 1.35 return _propagated;
|
102 mike 1.14 }
103
104 void setPropagated(Boolean propagated)
105 {
|
106 kumpf 1.35 _propagated = propagated;
|
107 mike 1.14 }
108
109 void addQualifier(const CIMQualifier& qualifier)
110 {
|
111 kumpf 1.35 _qualifiers.add(qualifier);
|
112 mike 1.14 }
113
|
114 kumpf 1.23 Uint32 findQualifier(const CIMName& name) const
|
115 mike 1.14 {
|
116 kumpf 1.35 return _qualifiers.find(name);
|
117 mike 1.14 }
118
|
119 kumpf 1.26 CIMQualifier getQualifier(Uint32 index)
|
120 mike 1.14 {
|
121 kumpf 1.35 return _qualifiers.getQualifier(index);
|
122 mike 1.14 }
123
|
124 kumpf 1.26 CIMConstQualifier getQualifier(Uint32 index) const
|
125 mike 1.14 {
|
126 kumpf 1.35 return _qualifiers.getQualifier(index);
|
127 mike 1.14 }
128
|
129 kumpf 1.26 void removeQualifier(Uint32 index)
|
130 mike 1.14 {
|
131 kumpf 1.35 _qualifiers.removeQualifier(index);
|
132 mike 1.14 }
133
134 Uint32 getQualifierCount() const
135 {
|
136 kumpf 1.35 return _qualifiers.getCount();
|
137 mike 1.14 }
138
139 void resolve(
|
140 kumpf 1.35 DeclContext* declContext,
141 const CIMNamespaceName& nameSpace,
142 Boolean isInstancePart,
143 const CIMConstProperty& property,
144 Boolean propagateQualifiers);
|
145 mike 1.14
146 void resolve(
|
147 kumpf 1.35 DeclContext* declContext,
148 const CIMNamespaceName& nameSpace,
149 Boolean isInstancePart,
150 Boolean propagateQualifiers);
|
151 mike 1.14
|
152 mike 1.31 void toXml(Buffer& out) const;
|
153 mike 1.14
|
154 karl 1.33 void toMof(Boolean isInstance, Buffer& out) const;
|
155 mike 1.15
|
156 mike 1.14 Boolean identical(const CIMPropertyRep* x) const;
157
|
158 kumpf 1.24 CIMPropertyRep* clone() const
|
159 mike 1.14 {
|
160 kumpf 1.35 return new CIMPropertyRep(*this, true);
|
161 mike 1.14 }
162
163 private:
164
165 CIMPropertyRep();
166
167 // Cloning constructor:
168
|
169 mike 1.16 CIMPropertyRep(const CIMPropertyRep& x, Boolean propagateQualifiers);
|
170 mike 1.14
|
171 kumpf 1.17 // This method is declared and made private so that the compiler does
172 // not implicitly define a default copy constructor.
173 CIMPropertyRep& operator=(const CIMPropertyRep& x)
174 {
|
175 kumpf 1.19 //PEGASUS_ASSERT(0);
|
176 kumpf 1.17 return *this;
177 }
|
178 mike 1.14
|
179 kumpf 1.23 CIMName _name;
|
180 mike 1.14 CIMValue _value;
181 Uint32 _arraySize;
|
182 kumpf 1.23 CIMName _referenceClassName;
183 CIMName _classOrigin;
|
184 mike 1.14 Boolean _propagated;
185 CIMQualifierList _qualifiers;
186
187 friend class CIMClassRep;
188 };
189
190 PEGASUS_NAMESPACE_END
191
192 #endif /* Pegasus_PropertyRep_h */
|