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

Diff for /pegasus/src/Pegasus/Common/CIMValue.h between version 1.46 and 1.51.30.1

version 1.46, 2005/07/08 22:04:43 version 1.51.30.1, 2008/07/01 15:17:57
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 8 
Line 8 
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 // EMC Corporation; VERITAS Software Corporation; The Open Group. // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 46 
Line 48 
  
 class CIMValueRep; class CIMValueRep;
 class CIMObject; class CIMObject;
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   class CIMInstance;
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
  
 /** /**
     The CIMValue class represents a value of any of the CIM data types      The CIMValue class represents a value of any of the CIM data types.
     (see \Ref{CIMType} for a list of valid CIM data types). This class      This class encapsulates a union which holds value of any CIMType.
     encapsulates a union which holds the current value. The class also      A type field indicates the type of the value.
     has a type field indicating the type of that value.  
 */ */
 class PEGASUS_COMMON_LINKAGE CIMValue class PEGASUS_COMMON_LINKAGE CIMValue
 { {
 public: public:
     /** Constructor - Creates an NULL CIMValue object set to null and      /**
         with type CIMType:none and !arraytype.          Constructs a null CIMValue with type Boolean and isArray=false.
     */     */
     CIMValue();     CIMValue();
  
     /** Constructor - Creates a NULL CIMValue object with the type and      /**
         array indicator set as specified.          Constructs a null CIMValue object with the specified type and
         @exception TypeMismatchException If the given type is not valid for a          array indicator.
         CIMValue object.          @param type The CIMType of the value
           @param isArray A Boolean indicating whether the value is of array type
           @param arraySize An integer specifying the size of the array, if the
               CIMValue is for an array of a fixed size.  This value is ignored
               if the isArray argument is false.
     */     */
     CIMValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);     CIMValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Boolean value to assign
       */
     CIMValue(Boolean x);     CIMValue(Boolean x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint8 value to assign
       */
     CIMValue(Uint8 x);     CIMValue(Uint8 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint8 value to assign
       */
     CIMValue(Sint8 x);     CIMValue(Sint8 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint16 value to assign
       */
     CIMValue(Uint16 x);     CIMValue(Uint16 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint16 value to assign
       */
     CIMValue(Sint16 x);     CIMValue(Sint16 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint32 value to assign
       */
     CIMValue(Uint32 x);     CIMValue(Uint32 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint32 value to assign
       */
     CIMValue(Sint32 x);     CIMValue(Sint32 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint64 value to assign
       */
     CIMValue(Uint64 x);     CIMValue(Uint64 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint64 value to assign
       */
     CIMValue(Sint64 x);     CIMValue(Sint64 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Real32 value to assign
       */
     CIMValue(Real32 x);     CIMValue(Real32 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Real64 value to assign
       */
     CIMValue(Real64 x);     CIMValue(Real64 x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Char16 value to assign
       */
     CIMValue(const Char16& x);     CIMValue(const Char16& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The String value to assign
       */
     CIMValue(const String& x);     CIMValue(const String& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMDateTime value to assign
       */
     CIMValue(const CIMDateTime& x);     CIMValue(const CIMDateTime& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMObjectPath value to assign
       */
     CIMValue(const CIMObjectPath& x);     CIMValue(const CIMObjectPath& x);
  
     /** Constructor.      /**
         Note: Constructing a CIMValue with an uninitialized CIMObject is not          Constructs a CIMValue with the specified value and inferred type.
         defined and results in a thrown UninitializedObjectException.          Note: The CIMObject argument is cloned to prevent subsequent
         Note: The input CIMObject will be cloned before putting it into the          modification through the shared representation model.
         value of the constructed CIMValue. This is because CIMObjects use a          @param x The CIMObject value to assign
         shared representation model, but we don't want CIMObjects inside a          @exception UninitializedObjectException If the CIMObject is
         CIMValue to be altered by other external changes.              uninitialized.
     */     */
     CIMValue(const CIMObject& x);     CIMValue(const CIMObject& x);
  
     /// Constructor.  #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       /**
           Constructs a CIMValue with the specified value and inferred type.
           Note: The CIMInstance argument is cloned to prevent subsequent
           modification through the shared representation model.
           @param x The CIMInstance value to assign
           @exception UninitializedObjectException If the CIMInstance is
               uninitialized.
       */
       CIMValue(const CIMInstance& x);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
       /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Boolean Array value to assign
       */
     CIMValue(const Array<Boolean>& x);     CIMValue(const Array<Boolean>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint8 Array value to assign
       */
     CIMValue(const Array<Uint8>& x);     CIMValue(const Array<Uint8>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint8 Array value to assign
       */
     CIMValue(const Array<Sint8>& x);     CIMValue(const Array<Sint8>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint16 Array value to assign
       */
     CIMValue(const Array<Uint16>& x);     CIMValue(const Array<Uint16>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint16 Array value to assign
       */
     CIMValue(const Array<Sint16>& x);     CIMValue(const Array<Sint16>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint32 Array value to assign
       */
     CIMValue(const Array<Uint32>& x);     CIMValue(const Array<Uint32>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint32 Array value to assign
       */
     CIMValue(const Array<Sint32>& x);     CIMValue(const Array<Sint32>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint64 Array value to assign
       */
     CIMValue(const Array<Uint64>& x);     CIMValue(const Array<Uint64>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint64 Array value to assign
       */
     CIMValue(const Array<Sint64>& x);     CIMValue(const Array<Sint64>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Real32 Array value to assign
       */
     CIMValue(const Array<Real32>& x);     CIMValue(const Array<Real32>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Real64 Array value to assign
       */
     CIMValue(const Array<Real64>& x);     CIMValue(const Array<Real64>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Char16 Array value to assign
       */
     CIMValue(const Array<Char16>& x);     CIMValue(const Array<Char16>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The String Array value to assign
       */
     CIMValue(const Array<String>& x);     CIMValue(const Array<String>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMDateTime Array value to assign
       */
     CIMValue(const Array<CIMDateTime>& x);     CIMValue(const Array<CIMDateTime>& x);
  
     /// Constructor.      /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMObjectPath Array value to assign
       */
     CIMValue(const Array<CIMObjectPath>& x);     CIMValue(const Array<CIMObjectPath>& x);
  
     /** Constructor.      /**
         Note: Constructing a CIMValue with an uninitialized CIMObject anywhere          Constructs a CIMValue with the specified value and inferred type.
         in the input array is not defined and results in a thrown          Note: The CIMObjects in the Array argument are cloned to prevent
         UninitializedObjectException.          subsequent modification through the shared representation model.
         Note: Each CIMObject in the input Array will be cloned before putting          @param x The CIMObject Array value to assign
         the Array into the value of the constructed CIMValue. This is because          @exception UninitializedObjectException If any of the CIMObjects in the
         CIMObjects use a shared representation model, but we don't want              Array are uninitialized.
         CIMObjects inside a CIMValue to be altered by other external changes.  
     */     */
     CIMValue(const Array<CIMObject>& x);     CIMValue(const Array<CIMObject>& x);
  
     /** Constructor.  #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
         Note: If the input type is CIMObject, it/they will be cloned before  #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         putting it into the value of the constructed CIMValue. This is because      /**
         CIMObjects use a shared representation model, but we don't want          Constructs a CIMValue with the specified value and inferred type.
         CIMObjects inside a CIMValue to be altered by other external changes.          Note: The CIMInstances in the Array argument are cloned to prevent
           subsequent modification through the shared representation model.
           @param x The CIMInstance Array value to assign
           @exception UninitializedObjectException If any of the CIMInstances in
               the Array are uninitialized.
       */
       CIMValue(const Array<CIMInstance>& x);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
       /**
           Constructs a CIMValue by copying another CIMValue object.
           Note: If the specified CIMValue contains CIMObject or CIMInstance
           objects, they are cloned to prevent subsequent modification through
           the shared representation model.
           @param x The CIMValue object to copy
     */     */
     CIMValue(const CIMValue& x);     CIMValue(const CIMValue& x);
  
     /// Destructor.      /**
           Destructs a CIMValue object.
       */
     ~CIMValue();     ~CIMValue();
  
     /** Operator =      /**
         Note: If the right hand side type is CIMObject, it/they will be cloned          Assigns the value from a specified CIMValue object.
         before putting it into the value of the target CIMValue. This is because          Note: If the specified CIMValue contains CIMObject or CIMInstance
         CIMObjects use a shared representation model, but we don't want          objects, they are cloned to prevent subsequent modification through
         CIMObjects inside a CIMValue to be altered by other external changes.          the shared representation model.
           @param x The CIMValue object to copy
           @return A reference to this CIMValue object with the new assignment
     */     */
     CIMValue& operator=(const CIMValue& x);     CIMValue& operator=(const CIMValue& x);
  
     /** Assigns one CIMValue object to another CIMValue object.      /**
         @param x - CIMValue object to be used for assignment.          Assigns the value from a specified CIMValue object.
         Note: If the input type is CIMObject, it/they will be cloned before          Note: If the specified CIMValue contains CIMObject or CIMInstance
         putting it into the value of the target CIMValue. This is because          objects, they are cloned to prevent subsequent modification through
         CIMObjects use a shared representation model, but we don't want          the shared representation model.
         CIMObjects inside a CIMValue to be altered by other external changes.          @param x The CIMValue object to copy
     */     */
     void assign(const CIMValue& x);     void assign(const CIMValue& x);
  
     /** Clears the attributes and value of the CIMValue object.      /**
           Resets to a null value with type Boolean and isArray=false.
     */     */
     void clear();     void clear();
  
     /** Compares the types of two CIMValues. This      /**
         compares the type field and the array indicators.          Compares the type and isArray attributes with a specified CIMValue.
         @return true if both are of the same type and both are either arrays          @param x The CIMValue object with which to compare
         or not, false otherwise.          @return A Boolean indicating whether the CIMValue objects have the same
         <pre>              type and isArray attribute value.
             CIMValue a(Boolean(true);  
             CIMValue b = a;  
             if b.typeCompatible(a)  
                 ...  
         </pre>  
     */     */
     Boolean typeCompatible(const CIMValue& x) const;     Boolean typeCompatible(const CIMValue& x) const;
  
     /** Determines if the value is an array.      /**
         @return true if the value is an array, false otherwise.          Indicates whether the value is an array.
           @return A Boolean indicating whether the value is an array.
     */     */
     Boolean isArray() const;     Boolean isArray() const;
  
     /** Determines whether the CIMvalue object is Null.      /**
         Null is the specific condition where no value has          Indicates whether the value is null.  A null CIMValue has a type, but
         yet been set. If a CIMValue object is Null, any get on that          no value can be retrieved from it.
         object will create an exception.          @return A Boolean indicating whether the value is null.
         @return true if the CIMValue object is Null, false otherwise.  
     */     */
     Boolean isNull() const;     Boolean isNull() const;
  
     /** Gets the size of an Array CIMValue.      /**
         @return The number of entries in the array.          Gets the fixed array size of a CIMValue.  This value is undefined for
           non-array values.  A value of 0 is given for variable size arrays.
           @return An integer indicating the array size.
     */     */
     Uint32 getArraySize() const;     Uint32 getArraySize() const;
  
     /** Gets the CIMType attribute for the CIMValue.      /**
         @return the CIMType value.          Gets the value type.
           @return A CIMType indicating the type of the value.
     */     */
     CIMType getType() const;     CIMType getType() const;
  
     /** Sets the CIMValue a NULL, but with valid CIMType and array      /**
         characteristics.          Sets the value to null with the specified type and array indicator.
         @param type - CIMType for this CIMValue.          @param type The CIMType of the value
         @param isArray - Boolean indicating whether this is an array CIMValue.          @param isArray A Boolean indicating whether the value is of array type
         @param arraySize - Optional parameter indicating the array size.          @param arraySize An integer specifying the size of the array, if the
         <pre>              CIMValue is for an array of a fixed size.  This value is ignored
             CIMValue value;              if the isArray argument is false.
             value.setNullValue(CIMType::BOOLEAN, false);  
         </pre>  
     */     */
     void setNullValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);     void setNullValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);
  
     /** Sets the type, Array attribute and puts the value provided      /**
         into the value of the target CIMValue.          Sets the CIMValue to the specified value and inferred type.
         <pre>          @param x The Boolean value to assign
             CIMValue x;  
             x.set(Uint16(9));  
         </pre>  
         @exception UninitializedObjectException If the given type is CIMObject,  
         and the input CIMObject parameter is uninitialized or at least one entry  
         in the Array of CIMObjects is uninitialized.  
         Note: If the input type is CIMObject, it/they will be cloned before  
         putting it into the value of the target CIMValue. This is because  
         CIMObjects use a shared representation model, but we don't want  
         CIMObjects inside a CIMValue to be altered by other external changes.  
     */     */
     void set(Boolean x);     void set(Boolean x);
  
     ///      /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint8 value to assign
       */
     void set(Uint8 x);     void set(Uint8 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint8 value to assign
       */
     void set(Sint8 x);     void set(Sint8 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint16 value to assign
       */
     void set(Uint16 x);     void set(Uint16 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint16 value to assign
       */
     void set(Sint16 x);     void set(Sint16 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint32 value to assign
       */
     void set(Uint32 x);     void set(Uint32 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint32 value to assign
       */
     void set(Sint32 x);     void set(Sint32 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint64 value to assign
       */
     void set(Uint64 x);     void set(Uint64 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint64 value to assign
       */
     void set(Sint64 x);     void set(Sint64 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Real32 value to assign
       */
     void set(Real32 x);     void set(Real32 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Real64 value to assign
       */
     void set(Real64 x);     void set(Real64 x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Char16 value to assign
       */
     void set(const Char16& x);     void set(const Char16& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The String value to assign
       */
     void set(const String& x);     void set(const String& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The CIMDateTime value to assign
       */
     void set(const CIMDateTime& x);     void set(const CIMDateTime& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The CIMObjectPath value to assign
       */
     void set(const CIMObjectPath& x);     void set(const CIMObjectPath& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           Note: The CIMObject argument is cloned to prevent subsequent
           modification through the shared representation model.
           @param x The CIMObject value to assign
           @exception UninitializedObjectException If the CIMObject is
               uninitialized.
       */
     void set(const CIMObject& x);     void set(const CIMObject& x);
     ///  
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       /**
           Sets the CIMValue to the specified value and inferred type.
           Note: The CIMInstance argument is cloned to prevent subsequent
           modification through the shared representation model.
           @param x The CIMInstance value to assign
           @exception UninitializedObjectException If the CIMInstance is
               uninitialized.
       */
       void set(const CIMInstance& x);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Boolean Array value to assign
       */
     void set(const Array<Boolean>& x);     void set(const Array<Boolean>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint8 Array value to assign
       */
     void set(const Array<Uint8>& x);     void set(const Array<Uint8>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint8 Array value to assign
       */
     void set(const Array<Sint8>& x);     void set(const Array<Sint8>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint16 Array value to assign
       */
     void set(const Array<Uint16>& x);     void set(const Array<Uint16>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint16 Array value to assign
       */
     void set(const Array<Sint16>& x);     void set(const Array<Sint16>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint32 Array value to assign
       */
     void set(const Array<Uint32>& x);     void set(const Array<Uint32>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint32 Array value to assign
       */
     void set(const Array<Sint32>& x);     void set(const Array<Sint32>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Uint64 Array value to assign
       */
     void set(const Array<Uint64>& x);     void set(const Array<Uint64>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Sint64 Array value to assign
       */
     void set(const Array<Sint64>& x);     void set(const Array<Sint64>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Real32 Array value to assign
       */
     void set(const Array<Real32>& x);     void set(const Array<Real32>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Real64 Array value to assign
       */
     void set(const Array<Real64>& x);     void set(const Array<Real64>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The Char16 Array value to assign
       */
     void set(const Array<Char16>& x);     void set(const Array<Char16>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The String Array value to assign
       */
     void set(const Array<String>& x);     void set(const Array<String>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The CIMDateTime Array value to assign
       */
     void set(const Array<CIMDateTime>& x);     void set(const Array<CIMDateTime>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           @param x The CIMObjectPath Array value to assign
       */
     void set(const Array<CIMObjectPath>& x);     void set(const Array<CIMObjectPath>& x);
     ///  
       /**
           Sets the CIMValue to the specified value and inferred type.
           Note: The CIMObjects in the Array argument are cloned to prevent
           subsequent modification through the shared representation model.
           @param x The CIMObject Array value to assign
           @exception UninitializedObjectException If any of the CIMObjects in the
               Array are uninitialized.
       */
     void set(const Array<CIMObject>& x);     void set(const Array<CIMObject>& x);
  
     /** Gets the value of a CIMValue.  #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
         Note: Before using get, the caller should use getType () and isNull ()  #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         to ensure that the value is not null, and is of the correct type.      /**
           Sets the CIMValue to the specified value and inferred type.
         The behavior of get is undefined when the value is null.          Note: The CIMInstances in the Array argument are cloned to prevent
           subsequent modification through the shared representation model.
         @param Variable in which to return the value.          @param x The CIMInstance Array value to assign
         @exception TypeMismatchException If the CIMValue type is not compatible          @exception UninitializedObjectException If any of the CIMInstances in
                    with the type of the output parameter.              the Array are uninitialized.
         <pre>      */
             Uint32 v;      void set(const Array<CIMInstance>& x);
             CIMValue value(CIMValue::UINT32, UINT32(99));  #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
             value.get(v);  #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
         </pre>  
  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Boolean into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
       void get(Boolean& x) const;
   
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Uint8 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
       void get(Uint8& x) const;
   
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint8 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
       void get(Sint8& x) const;
   
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Uint16 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
       void get(Uint16& x) const;
   
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint16 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
       void get(Sint16& x) const;
   
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
         <pre>         <pre>
             Uint32 v;             Uint32 v;
             CIMValue value = property.getValue ();             CIMValue value = property.getValue ();
             if ((value.getType () == CIMTYPE_UINT32) && (!value.isNull ()))             if ((value.getType () == CIMTYPE_UINT32) && (!value.isNull ()))
                 value.get (v);                 value.get (v);
         </pre>         </pre>
           @param x Output Uint32 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
     */     */
     void get(Boolean& x) const;  
     ///  
     void get(Uint8& x) const;  
     ///  
     void get(Sint8& x) const;  
     ///  
     void get(Uint16& x) const;  
     ///  
     void get(Sint16& x) const;  
     ///  
     void get(Uint32& x) const;     void get(Uint32& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint32 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Sint32& x) const;     void get(Sint32& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Uint64 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Uint64& x) const;     void get(Uint64& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint64 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Sint64& x) const;     void get(Sint64& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Real32 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Real32& x) const;     void get(Real32& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Real64 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Real64& x) const;     void get(Real64& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Char16 into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Char16& x) const;     void get(Char16& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output String into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(String& x) const;     void get(String& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMDateTime into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(CIMDateTime& x) const;     void get(CIMDateTime& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMObjectPath into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(CIMObjectPath& x) const;     void get(CIMObjectPath& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMObject into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(CIMObject& x) const;     void get(CIMObject& x) const;
     ///  
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMInstance into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
       void get(CIMInstance& x) const;
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Boolean Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Boolean>& x) const;     void get(Array<Boolean>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Uint8 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Uint8>& x) const;     void get(Array<Uint8>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint8 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Sint8>& x) const;     void get(Array<Sint8>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Uint16 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Uint16>& x) const;     void get(Array<Uint16>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint16 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Sint16>& x) const;     void get(Array<Sint16>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Uint32 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Uint32>& x) const;     void get(Array<Uint32>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint32 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Sint32>& x) const;     void get(Array<Sint32>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Uint64 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Uint64>& x) const;     void get(Array<Uint64>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Sint64 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Sint64>& x) const;     void get(Array<Sint64>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Real32 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Real32>& x) const;     void get(Array<Real32>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Real64 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Real64>& x) const;     void get(Array<Real64>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output Char16 Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<Char16>& x) const;     void get(Array<Char16>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output String Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<String>& x) const;     void get(Array<String>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMDateTime Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<CIMDateTime>& x) const;     void get(Array<CIMDateTime>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMObjectPath Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<CIMObjectPath>& x) const;     void get(Array<CIMObjectPath>& x) const;
     ///  
       /**
           Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMObject Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
     void get(Array<CIMObject>& x) const;     void get(Array<CIMObject>& x) const;
  
     /** Compares with another CIMValue object for equality.  #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
         @param x - CIMValue to compare with.  #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         @return true if they are identical in type, attribute and value,      /**
         false otherwise.          Gets the value of the CIMValue.  The caller should first verify that
           the value is of the expected type and is not null.  The behavior is
           undefined for null values.
           @param x Output CIMInstance Array into which the value is stored.
           @exception TypeMismatchException If the value type does not match the
               output parameter.
       */
       void get(Array<CIMInstance>& x) const;
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
       /**
           Compares with another CIMValue object for equality.
           @param x The CIMValue with which to compare
           @return A Boolean indicating whether they are identical in type,
               array attributes, and value.
     */     */
     Boolean equal(const CIMValue& x) const;     Boolean equal(const CIMValue& x) const;
  
     /** Converts the CIMvalue to a string.  Should only be      /**
         used for output purposes.  To get an actual String value, use          Converts a CIMValue to a String.  This method should only be
         get(String &).          used for diagnostic output purposes.  To get an actual String value,
         @return  String output for CIMValue.          use get(String &).
         <PRE>          @return A String representation of the value.
             String test;  
             CIMValue value(Boolean(true));  
             test = value.toString();  // puts "TRUE" into test  
         </PRE>  
     */     */
     String toString() const;     String toString() const;
  
 #ifdef PEGASUS_USE_DEPRECATED_INTERFACES #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
     /**     /**
         <I><B>Deprecated Interface</B></I><BR>         <I><B>Deprecated Interface</B></I><BR>
         Constructor.  (Note: This constructor exists solely to support binary          Constructs a CIMValue with the specified value and type Sint8.
         compatibility with a previous definition of the Sint8 type.)          (Note: This constructor exists solely to support binary compatibility
           with a previous definition of the Sint8 type.)
           @param x The Sint8 value to assign
     */     */
     CIMValue(char x);     CIMValue(char x);
  
     /**     /**
         <I><B>Deprecated Interface</B></I><BR>         <I><B>Deprecated Interface</B></I><BR>
         Constructor.  (Note: This constructor exists solely to support binary          Constructs a CIMValue with the specified value and type Sint8 Array.
         compatibility with a previous definition of the Sint8 type.)          (Note: This constructor exists solely to support binary compatibility
           with a previous definition of the Sint8 type.)
           @param x The Sint8 Array value to assign
     */     */
     CIMValue(const Array<char>& x);     CIMValue(const Array<char>& x);
  
     /**     /**
         <I><B>Deprecated Interface</B></I><BR>         <I><B>Deprecated Interface</B></I><BR>
         Sets an Sint8 value.  (Note: This method exists solely to support          Sets the CIMValue to the specified value and type Sint8.
         binary compatibility with a previous definition of the Sint8 type.)          (Note: This method exists solely to support binary compatibility with
           a previous definition of the Sint8 type.)
           @param x The value to assign
     */     */
     void set(char x);     void set(char x);
  
     /**     /**
         <I><B>Deprecated Interface</B></I><BR>         <I><B>Deprecated Interface</B></I><BR>
         Sets an Sint8 array value.  (Note: This method exists solely to support          Sets the CIMValue to the specified value and type Sint8 Array.
         binary compatibility with a previous definition of the Sint8 type.)          (Note: This method exists solely to support binary compatibility with
           a previous definition of the Sint8 type.)
           @param x The Array value to assign
     */     */
     void set(const Array<char>& x);     void set(const Array<char>& x);
  
     /**     /**
         <I><B>Deprecated Interface</B></I><BR>         <I><B>Deprecated Interface</B></I><BR>
         Gets an Sint8 value.  (Note: This method exists solely to support          Gets the Sint8 value of the CIMValue.  The caller should first verify
         binary compatibility with a previous definition of the Sint8 type.)          that the value is of the expected type and is not null.  The behavior
           is undefined for null values.
           (Note: This method exists solely to support binary compatibility with
           a previous definition of the Sint8 type.)
           @param x Output variable into which the value is stored.
     */     */
     void get(char& x) const;     void get(char& x) const;
  
     /**     /**
         <I><B>Deprecated Interface</B></I><BR>         <I><B>Deprecated Interface</B></I><BR>
         Gets an Sint8 array value.  (Note: This method exists solely to support          Gets the Sint8 Array value of the CIMValue.  The caller should first
         binary compatibility with a previous definition of the Sint8 type.)          verify that the value is of the expected type and is not null.  The
           behavior is undefined for null values.
           (Note: This method exists solely to support binary compatibility with
           a previous definition of the Sint8 type.)
           @param x Output Array variable into which the value is stored.
     */     */
     void get(Array<char>& x) const;     void get(Array<char>& x) const;
 #endif #endif
  
 private: private:
  
       void _get(const String*& data, Uint32& size) const;
   
     CIMValueRep* _rep;     CIMValueRep* _rep;
  
     friend class CIMMethodRep;     friend class CIMMethodRep;
Line 497 
Line 1058 
     friend class CIMQualifierRep;     friend class CIMQualifierRep;
     friend class CIMQualifierDeclRep;     friend class CIMQualifierDeclRep;
     friend class BinaryStreamer;     friend class BinaryStreamer;
       friend class XmlWriter;
 }; };
  
 /** operator == compares two CIMValue objects for equality.  /**
     @param x - First CIMValue to compare      Compares two CIMValue objects for equality.
     @param y - Second CIMValue to compare      @param x First CIMValue to compare
     @return true if they are identical in type, attribute and value,      @param y Second CIMValue to compare
     false otherwise.      @return A Boolean indicating whether they are identical in type, array
           attributes, and value.
 */ */
 PEGASUS_COMMON_LINKAGE Boolean operator==(const CIMValue& x, const CIMValue& y); PEGASUS_COMMON_LINKAGE Boolean operator==(const CIMValue& x, const CIMValue& y);
  
 /** operator != compares two CIMValue objects for inequality.  /**
     @param x - First CIMValue to compare      Compares two CIMValue objects for inequality.
     @param y - Second CIMValue to compare      @param x First CIMValue to compare
     @return true if they are NOT identical in type, attribute or value,      @param y Second CIMValue to compare
     false otherwise.      @return A Boolean indicating whether they are NOT identical in type, array
           attributes, and value.
 */ */
 PEGASUS_COMMON_LINKAGE Boolean operator!=(const CIMValue& x, const CIMValue& y); PEGASUS_COMMON_LINKAGE Boolean operator!=(const CIMValue& x, const CIMValue& y);
  
Line 521 
Line 1085 
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
   #ifdef PEGASUS_INTERNALONLY
   #include <Pegasus/Common/CIMValueInline.h>
   #endif
   
 #endif /* Pegasus_Value_h */ #endif /* Pegasus_Value_h */


Legend:
Removed from v.1.46  
changed lines
  Added in v.1.51.30.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2