(file) Return to CIMParamValue.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 karl  1.22 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.2  //
  3 karl  1.20 // 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.18 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.20 // 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.21 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.22 // 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.13 // 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.13 // 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.13 // 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            #ifndef Pegasus_ParamValue_h
 35            #define Pegasus_ParamValue_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 kumpf 1.8  #include <Pegasus/Common/String.h>
 39            #include <Pegasus/Common/CIMValue.h>
 40 kumpf 1.14 #include <Pegasus/Common/Linkage.h>
 41 mike  1.2  
 42            PEGASUS_NAMESPACE_BEGIN
 43 kumpf 1.8  
 44            class CIMParamValueRep;
 45 mike  1.2  
 46            ////////////////////////////////////////////////////////////////////////////////
 47            //
 48            // CIMParamValue
 49            //
 50            ////////////////////////////////////////////////////////////////////////////////
 51            
 52 kumpf 1.23 /**
 53                The CIMParamValue class represents an extrinsic method parameter value,
 54                as defined in the DMTF Specification for CIM Operations over HTTP.
 55            
 56                <p>The CIMParamValue class uses a shared representation model, such that
 57                multiple CIMParamValue objects may refer to the same data copy.  Assignment
 58                and copy operators create new references to the same data, not distinct
 59                copies.  An update to a CIMParamValue object affects all the CIMParamValue
 60                objects that refer to the same data copy.  The data remains valid until
 61                all the CIMParamValue objects that refer to it are destructed.  A separate
 62                copy of the data may be created using the clone method.
 63            */
 64 mike  1.2  class PEGASUS_COMMON_LINKAGE CIMParamValue
 65            {
 66            public:
 67            
 68 kumpf 1.23     /**
 69                    Constructs an uninitialized CIMParamValue object.  A method
 70                    invocation on an uninitialized object will result in the throwing
 71                    of an UninitializedObjectException.  An uninitialized object may
 72                    be converted into an initialized object only by using the assignment
 73                    operator with an initialized object.
 74                */
 75 kumpf 1.6      CIMParamValue();
 76 mike  1.2  
 77 kumpf 1.23     /**
 78                    Constructs a CIMParamValue object from the value of a specified
 79                    CIMParamValue object, so that both objects refer to the same data
 80                    copy.
 81                    @param x The CIMParamValue object from which to construct a new
 82                        CIMParamValue object.
 83                */
 84 kumpf 1.6      CIMParamValue(const CIMParamValue& x);
 85 mike  1.2  
 86 kumpf 1.23     /**
 87                    Assigns the value of the specified CIMParamValue object to this
 88                    object, so that both objects refer to the same data copy.
 89                    @param x The CIMParamValue object from which to assign this
 90                        CIMParamValue object.
 91                    @return A reference to this CIMParamValue object.
 92                */
 93 kumpf 1.6      CIMParamValue& operator=(const CIMParamValue& x);
 94 mike  1.2  
 95 kumpf 1.23     /**
 96                    Constructs a parameter value with the specified attributes.
 97                    @param parameterName A String containing the name of this parameter.
 98                    @param value A CIMValue containing the value of this parameter.
 99                    @param isTyped A Boolean indicating whether the type indicated in
100                        the value is correct.  This is needed because the Specification
101                        for the Representation of CIM in XML does not require type
102                        information to be specified with a parameter value.
103                    @exception UninitializedObjectException If the parameter name is an
104                        empty String.
105                */
106 mike  1.2      CIMParamValue(
107 kumpf 1.5  	String parameterName,
108            	CIMValue value,
109 kumpf 1.6  	Boolean isTyped=true);
110            
111 kumpf 1.23     /**
112                    Destructs the CIMParamValue object.
113                */
114 kumpf 1.6      ~CIMParamValue();
115 mike  1.2  
116 kumpf 1.23     /**
117                    Gets the parameter name for the parameter value.
118                    @return A String containing the parameter name.
119                    @exception UninitializedObjectException If the object is not
120                        initialized.
121                */
122 kumpf 1.6      String getParameterName() const;
123            
124 kumpf 1.23     /**
125                    Gets the value for the parameter.
126                    @return A CIMValue containing the parameter value.
127                    @exception UninitializedObjectException If the object is not
128                        initialized.
129                */
130 kumpf 1.6      CIMValue getValue() const;
131 mike  1.2  
132 kumpf 1.23     /**
133                    Checks whether the parameter value has the correct type.
134                    @return True if the parameter value is known to have the correct
135                        type, false otherwise.
136                    @exception UninitializedObjectException If the object is not
137                        initialized.
138                */
139 kumpf 1.6      Boolean isTyped() const;
140 mike  1.2  
141 kumpf 1.23     /**
142                    Sets the parameter name for the parameter value.
143                    @param parameterName A String containing the parameter name.
144                    @exception UninitializedObjectException If the object is not
145                        initialized.
146                */
147 kumpf 1.6      void setParameterName(String& parameterName);
148 mike  1.2  
149 kumpf 1.23     /**
150                    Sets the value for the parameter.
151                    @param value A CIMValue containing the parameter value.
152                    @exception UninitializedObjectException If the object is not
153                        initialized.
154                */
155 kumpf 1.6      void setValue(CIMValue& value);
156 mike  1.2  
157 kumpf 1.23     /**
158                    Sets a flag indicating whether the parameter value has the correct
159                    type.
160                    @param isTyped A Boolean indicating whether the parameter value is
161                        known to have the correct type.
162                    @exception UninitializedObjectException If the object is not
163                        initialized.
164                */
165 kumpf 1.16     void setIsTyped(Boolean isTyped);
166 mike  1.2  
167 kumpf 1.23     /**
168                    Makes a deep copy of the object.  This creates a new copy of all
169                    the object attributes.
170                    @return A new copy of the CIMParamValue object.
171                    @exception UninitializedObjectException If the object is not
172                        initialized.
173                */
174 kumpf 1.6      CIMParamValue clone() const;
175 mike  1.2  
176 kumpf 1.23     /**
177                    Determines whether the object has been initialized.
178                    @return True if the object has not been initialized, false otherwise.
179                */
180 kumpf 1.15     Boolean isUninitialized() const;
181 mike  1.2  
182            private:
183            
184 kumpf 1.6      CIMParamValue(CIMParamValueRep* rep);
185            
186                void _checkRep() const;
187 mike  1.2  
188                CIMParamValueRep* _rep;
189 kumpf 1.11 
190                friend class XmlWriter;
191 mike  1.2  };
192            
193            #define PEGASUS_ARRAY_T CIMParamValue
194 kumpf 1.12 # include <Pegasus/Common/ArrayInter.h>
195 mike  1.2  #undef PEGASUS_ARRAY_T
196            
197            PEGASUS_NAMESPACE_END
198            
199            #endif /* Pegasus_ParamValue_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2