1 martin 1.38 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.39 //
|
3 martin 1.38 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.39 //
|
10 martin 1.38 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.39 //
|
17 martin 1.38 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.39 //
|
20 martin 1.38 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.39 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.38 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.39 //
|
28 martin 1.38 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.11 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_QualifierDeclRep_h
33 #define Pegasus_QualifierDeclRep_h
34
35 #include <Pegasus/Common/Config.h>
|
36 kumpf 1.21 #include <Pegasus/Common/Linkage.h>
37 #include <Pegasus/Common/CIMName.h>
|
38 mike 1.11 #include <Pegasus/Common/CIMValue.h>
39 #include <Pegasus/Common/Array.h>
|
40 kumpf 1.24 #include <Pegasus/Common/InternalException.h>
|
41 mike 1.11 #include <Pegasus/Common/CIMFlavor.h>
42 #include <Pegasus/Common/CIMScope.h>
|
43 mike 1.29 #include <Pegasus/Common/Buffer.h>
|
44 mike 1.11
45 PEGASUS_NAMESPACE_BEGIN
46
47 class CIMConstQualifierDecl;
48 class CIMQualifierDecl;
49
|
50 thilo.boehm 1.36 class CIMQualifierDeclRep
|
51 mike 1.11 {
52 public:
53
54 CIMQualifierDeclRep(
|
55 kumpf 1.32 const CIMName& name,
56 const CIMValue& value,
57 const CIMScope & scope,
58 const CIMFlavor & flavor,
59 Uint32 arraySize);
|
60 mike 1.11
|
61 kumpf 1.32 const CIMName& getName() const
62 {
63 return _name;
|
64 mike 1.11 }
65
|
66 kumpf 1.21 void setName(const CIMName& name);
|
67 mike 1.11
|
68 kumpf 1.32 CIMType getType() const
|
69 mike 1.11 {
|
70 kumpf 1.32 return _value.getType();
|
71 mike 1.11 }
72
|
73 kumpf 1.32 Boolean isArray() const
|
74 mike 1.11 {
|
75 kumpf 1.32 return _value.isArray();
|
76 mike 1.11 }
77
|
78 kumpf 1.32 const CIMValue& getValue() const
79 {
80 return _value;
|
81 mike 1.11 }
82
|
83 marek 1.35 void setValue(const CIMValue& value)
84 {
85 _value = value;
86 }
87
|
88 mike 1.11
|
89 kumpf 1.32 const CIMScope & getScope () const
|
90 mike 1.11 {
|
91 kumpf 1.32 return _scope;
|
92 mike 1.11 }
93
|
94 kumpf 1.32 const CIMFlavor & getFlavor() const
|
95 mike 1.11 {
|
96 kumpf 1.32 return _flavor;
|
97 mike 1.11 }
98
|
99 kumpf 1.32 Uint32 getArraySize() const
|
100 mike 1.11 {
|
101 kumpf 1.32 return _arraySize;
|
102 mike 1.11 }
103
104 Boolean identical(const CIMQualifierDeclRep* x) const;
105
106 CIMQualifierDeclRep* clone() const
107 {
|
108 kumpf 1.32 return new CIMQualifierDeclRep(*this);
|
109 mike 1.11 }
110
|
111 thilo.boehm 1.36 void Inc()
112 {
113 _refCounter++;
114 }
115
116 void Dec()
117 {
118 if (_refCounter.decAndTestIfZero())
119 delete this;
120 }
121
|
122 mike 1.11 private:
123
124 CIMQualifierDeclRep(const CIMQualifierDeclRep& x);
125
|
126 kumpf 1.33 CIMQualifierDeclRep(); // Unimplemented
127 // Unimplemented
128 CIMQualifierDeclRep& operator=(const CIMQualifierDeclRep& x);
|
129 mike 1.11
|
130 kumpf 1.21 CIMName _name;
|
131 mike 1.11 CIMValue _value;
|
132 kumpf 1.22 CIMScope _scope;
|
133 kumpf 1.23 CIMFlavor _flavor;
|
134 mike 1.11 Uint32 _arraySize;
|
135 thilo.boehm 1.36
136 // reference counter as member to avoid
137 // virtual function resolution overhead
138 AtomicInt _refCounter;
|
139 mike 1.37 friend class CIMBuffer;
|
140 mike 1.11 };
141
142 PEGASUS_NAMESPACE_END
143
144 #endif /* Pegasus_QualifierDeclRep_h */
|