1 mike 1.2 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 mike 1.2 //==============================================================================
23 //
24 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
25 //
|
39 kumpf 1.3
40 CIMParamValue::CIMParamValue()
41 : _rep(0)
42 {
43 }
44
45 CIMParamValue::CIMParamValue(const CIMParamValue& x)
46 {
47 Inc(_rep = x._rep);
48 }
49
50 CIMParamValue::CIMParamValue(CIMParamValueRep* rep)
51 : _rep(rep)
52 {
53 }
54
55 CIMParamValue& CIMParamValue::operator=(const CIMParamValue& x)
56 {
57 if (x._rep != _rep)
58 {
59 Dec(_rep);
60 kumpf 1.3 Inc(_rep = x._rep);
61 }
62 return *this;
63 }
64
65 CIMParamValue::CIMParamValue(
66 String parameterName,
67 CIMValue value,
68 Boolean isTyped)
69 {
70 _rep = new CIMParamValueRep(parameterName, value, isTyped);
71 }
72
73 CIMParamValue::~CIMParamValue()
74 {
75 Dec(_rep);
76 }
77
78 String CIMParamValue::getParameterName() const
79 {
80 _checkRep();
81 kumpf 1.3 return _rep->getParameterName();
82 }
83
84 CIMValue CIMParamValue::getValue() const
85 {
86 _checkRep();
87 return _rep->getValue();
88 }
89
90 Boolean CIMParamValue::isTyped() const
91 {
92 _checkRep();
93 return _rep->isTyped();
94 }
95
96 void CIMParamValue::setParameterName(String& parameterName)
97 {
98 _checkRep();
99 _rep->setParameterName(parameterName);
100 }
101
102 kumpf 1.3 void CIMParamValue::setValue(CIMValue& value)
103 {
104 _checkRep();
105 _rep->setValue(value);
106 }
107
108 void CIMParamValue::setIsTyped(Boolean isTyped)
109 {
110 _checkRep();
111 _rep->setIsTyped(isTyped);
112 }
113
|