1 karl 1.16 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.14 // 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.13 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.14 // 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.15 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.16 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.2 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.8 // 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.2 // 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.8 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.2 // 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.8 // 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.2 // 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 kumpf 1.4 #include "CIMParamValueRep.h"
|
35 mike 1.2 #include "CIMParamValue.h"
36
37 PEGASUS_NAMESPACE_BEGIN
38
39 #define PEGASUS_ARRAY_T CIMParamValue
40 # include "ArrayImpl.h"
41 #undef PEGASUS_ARRAY_T
42
|
43 kumpf 1.3
44 CIMParamValue::CIMParamValue()
45 : _rep(0)
46 {
47 }
48
49 CIMParamValue::CIMParamValue(const CIMParamValue& x)
50 {
51 Inc(_rep = x._rep);
52 }
53
54 CIMParamValue::CIMParamValue(CIMParamValueRep* rep)
55 : _rep(rep)
56 {
57 }
58
59 CIMParamValue& CIMParamValue::operator=(const CIMParamValue& x)
60 {
61 if (x._rep != _rep)
62 {
63 Dec(_rep);
64 kumpf 1.3 Inc(_rep = x._rep);
65 }
66 return *this;
67 }
68
69 CIMParamValue::CIMParamValue(
70 String parameterName,
71 CIMValue value,
72 Boolean isTyped)
73 {
74 _rep = new CIMParamValueRep(parameterName, value, isTyped);
75 }
76
77 CIMParamValue::~CIMParamValue()
78 {
79 Dec(_rep);
80 }
81
|
82 kumpf 1.18 String CIMParamValue::getParameterName() const
83 {
|
84 kumpf 1.3 _checkRep();
85 return _rep->getParameterName();
86 }
87
|
88 kumpf 1.18 CIMValue CIMParamValue::getValue() const
89 {
|
90 kumpf 1.3 _checkRep();
91 return _rep->getValue();
92 }
93
|
94 kumpf 1.18 Boolean CIMParamValue::isTyped() const
95 {
|
96 kumpf 1.3 _checkRep();
97 return _rep->isTyped();
98 }
99
100 void CIMParamValue::setParameterName(String& parameterName)
|
101 kumpf 1.18 {
|
102 kumpf 1.3 _checkRep();
103 _rep->setParameterName(parameterName);
104 }
105
106 void CIMParamValue::setValue(CIMValue& value)
|
107 kumpf 1.18 {
|
108 kumpf 1.3 _checkRep();
109 _rep->setValue(value);
110 }
111
112 void CIMParamValue::setIsTyped(Boolean isTyped)
|
113 kumpf 1.18 {
|
114 kumpf 1.3 _checkRep();
115 _rep->setIsTyped(isTyped);
116 }
117
|
118 kumpf 1.9 Boolean CIMParamValue::isUninitialized() const
|
119 kumpf 1.3 {
|
120 kumpf 1.19 return _rep == 0;
|
121 kumpf 1.3 }
122
123 CIMParamValue CIMParamValue::clone() const
124 {
|
125 kumpf 1.17 _checkRep();
|
126 kumpf 1.3 return CIMParamValue(_rep->clone());
127 }
128
129 void CIMParamValue::_checkRep() const
130 {
131 if (!_rep)
|
132 kumpf 1.11 throw UninitializedObjectException();
|
133 mike 1.2 }
134
135 PEGASUS_NAMESPACE_END
|