1 karl 1.27 //%2003////////////////////////////////////////////////////////////////////////
|
2 mike 1.11 //
|
3 karl 1.27 // 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 // IBM Corp.; EMC Corporation, The Open Group.
|
7 mike 1.11 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
9 kumpf 1.21 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
12 mike 1.11 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
|
15 kumpf 1.21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
16 mike 1.11 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
18 kumpf 1.21 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
21 mike 1.11 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
26 // Author: Mike Brasher (mbrasher@bmc.com)
27 //
|
28 kumpf 1.24 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
29 // (carolann_graves@hp.com)
|
30 mike 1.11 //
31 //%/////////////////////////////////////////////////////////////////////////////
32
33 #ifndef Pegasus_QualifierRep_h
34 #define Pegasus_QualifierRep_h
35
36 #include <Pegasus/Common/Config.h>
|
37 kumpf 1.23 #include <Pegasus/Common/Linkage.h>
38 #include <Pegasus/Common/CIMName.h>
|
39 mike 1.11 #include <Pegasus/Common/CIMValue.h>
40 #include <Pegasus/Common/Sharable.h>
41 #include <Pegasus/Common/Array.h>
42 #include <Pegasus/Common/Pair.h>
|
43 kumpf 1.26 #include <Pegasus/Common/InternalException.h>
|
44 mike 1.11 #include <Pegasus/Common/CIMFlavor.h>
45
46 PEGASUS_NAMESPACE_BEGIN
47
48 class CIMConstQualifier;
49 class CIMQualifier;
50
51 class PEGASUS_COMMON_LINKAGE CIMQualifierRep : public Sharable
52 {
53 public:
54
55 CIMQualifierRep(
|
56 kumpf 1.23 const CIMName& name,
|
57 mike 1.11 const CIMValue& value,
|
58 kumpf 1.24 const CIMFlavor & flavor,
|
59 mike 1.11 Boolean propagated);
60
61 virtual ~CIMQualifierRep();
62
|
63 kumpf 1.23 const CIMName& getName() const
|
64 mike 1.11 {
65 return _name;
66 }
67
|
68 kumpf 1.23 void setName(const CIMName& name);
|
69 mike 1.11
70 CIMType getType() const
71 {
72 return _value.getType();
73 }
74
75 Boolean isArray() const
76 {
77 return _value.isArray();
78 }
79
80 const CIMValue& getValue() const
81 {
82 return _value;
83 }
84
85 void setValue(const CIMValue& value);
86
|
87 kumpf 1.24 const CIMFlavor & getFlavor() const
|
88 mike 1.11 {
89 return _flavor;
90 }
91
|
92 kumpf 1.24 void setFlavor(const CIMFlavor & flavor)
|
93 karl 1.14 {
|
94 kumpf 1.24 _flavor = flavor;
|
95 karl 1.14 }
|
96 karl 1.15
|
97 kumpf 1.25 void unsetFlavor(const CIMFlavor & flavor)
|
98 karl 1.15 {
|
99 kumpf 1.24 _flavor.removeFlavor (flavor);
|
100 karl 1.15 }
101
|
102 kumpf 1.24 void resolveFlavor (const CIMFlavor & inheritedFlavor, Boolean inherited);
|
103 karl 1.14
|
104 mike 1.11 Boolean getPropagated() const
105 {
106 return _propagated;
107 }
108
109 void setPropagated(Boolean propagated)
110 {
111 _propagated = propagated;
112 }
113
114 void toXml(Array<Sint8>& out) const;
115
|
116 mike 1.12 void toMof(Array<Sint8>& out) const;
117
|
118 mike 1.11 Boolean identical(const CIMQualifierRep* x) const;
119
120 CIMQualifierRep* clone() const
121 {
122 return new CIMQualifierRep(*this);
123 }
124
125 private:
126
127 CIMQualifierRep();
128
129 // Cloning constructor:
130
131 CIMQualifierRep(const CIMQualifierRep& x);
132
|
133 kumpf 1.16 // This method is declared and made private so that the compiler does
134 // not implicitly define a default copy constructor.
135 CIMQualifierRep& operator=(const CIMQualifierRep& x)
136 {
|
137 kumpf 1.20 //PEGASUS_ASSERT(0);
|
138 kumpf 1.16 return *this;
139 }
|
140 mike 1.11
|
141 kumpf 1.23 CIMName _name;
|
142 mike 1.11 CIMValue _value;
|
143 kumpf 1.24 CIMFlavor _flavor;
|
144 mike 1.11 Boolean _propagated;
145 };
146
147 PEGASUS_NAMESPACE_END
148
149 #endif /* Pegasus_QualifierRep_h */
|