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