1 karl 1.30 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.11 //
|
3 karl 1.26 // 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.25 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.26 // 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.28 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.30 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.11 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.19 // 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.11 // 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.19 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.11 // 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.19 // 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.11 // 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_QualifierDeclRep_h
35 #define Pegasus_QualifierDeclRep_h
36
37 #include <Pegasus/Common/Config.h>
|
38 kumpf 1.21 #include <Pegasus/Common/Linkage.h>
39 #include <Pegasus/Common/CIMName.h>
|
40 mike 1.11 #include <Pegasus/Common/CIMValue.h>
41 #include <Pegasus/Common/Array.h>
|
42 kumpf 1.24 #include <Pegasus/Common/InternalException.h>
|
43 mike 1.11 #include <Pegasus/Common/CIMFlavor.h>
44 #include <Pegasus/Common/CIMScope.h>
|
45 mike 1.29 #include <Pegasus/Common/Buffer.h>
|
46 mike 1.11
47 PEGASUS_NAMESPACE_BEGIN
48
49 class CIMConstQualifierDecl;
50 class CIMQualifierDecl;
51
|
52 thilo.boehm 1.36 class CIMQualifierDeclRep
|
53 mike 1.11 {
54 public:
55
56 CIMQualifierDeclRep(
|
57 kumpf 1.32 const CIMName& name,
58 const CIMValue& value,
59 const CIMScope & scope,
60 const CIMFlavor & flavor,
61 Uint32 arraySize);
|
62 mike 1.11
|
63 kumpf 1.32 const CIMName& getName() const
64 {
65 return _name;
|
66 mike 1.11 }
67
|
68 kumpf 1.21 void setName(const CIMName& name);
|
69 mike 1.11
|
70 kumpf 1.32 CIMType getType() const
|
71 mike 1.11 {
|
72 kumpf 1.32 return _value.getType();
|
73 mike 1.11 }
74
|
75 kumpf 1.32 Boolean isArray() const
|
76 mike 1.11 {
|
77 kumpf 1.32 return _value.isArray();
|
78 mike 1.11 }
79
|
80 kumpf 1.32 const CIMValue& getValue() const
81 {
82 return _value;
|
83 mike 1.11 }
84
|
85 marek 1.35 void setValue(const CIMValue& value)
86 {
87 _value = value;
88 }
89
|
90 mike 1.11
|
91 kumpf 1.32 const CIMScope & getScope () const
|
92 mike 1.11 {
|
93 kumpf 1.32 return _scope;
|
94 mike 1.11 }
95
|
96 kumpf 1.32 const CIMFlavor & getFlavor() const
|
97 mike 1.11 {
|
98 kumpf 1.32 return _flavor;
|
99 mike 1.11 }
100
|
101 kumpf 1.32 Uint32 getArraySize() const
|
102 mike 1.11 {
|
103 kumpf 1.32 return _arraySize;
|
104 mike 1.11 }
105
106 Boolean identical(const CIMQualifierDeclRep* x) const;
107
108 CIMQualifierDeclRep* clone() const
109 {
|
110 kumpf 1.32 return new CIMQualifierDeclRep(*this);
|
111 mike 1.11 }
112
|
113 thilo.boehm 1.36 void Inc()
114 {
115 _refCounter++;
116 }
117
118 void Dec()
119 {
120 if (_refCounter.decAndTestIfZero())
121 delete this;
122 }
123
|
124 mike 1.11 private:
125
126 CIMQualifierDeclRep(const CIMQualifierDeclRep& x);
127
|
128 kumpf 1.33 CIMQualifierDeclRep(); // Unimplemented
129 // Unimplemented
130 CIMQualifierDeclRep& operator=(const CIMQualifierDeclRep& x);
|
131 mike 1.11
|
132 kumpf 1.21 CIMName _name;
|
133 mike 1.11 CIMValue _value;
|
134 kumpf 1.22 CIMScope _scope;
|
135 kumpf 1.23 CIMFlavor _flavor;
|
136 mike 1.11 Uint32 _arraySize;
|
137 thilo.boehm 1.36
138 // reference counter as member to avoid
139 // virtual function resolution overhead
140 AtomicInt _refCounter;
|
141 mike 1.37 friend class CIMBuffer;
|
142 mike 1.11 };
143
144 PEGASUS_NAMESPACE_END
145
146 #endif /* Pegasus_QualifierDeclRep_h */
|