(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.15 and 1.51.30.1

version 1.15, 2002/02/21 11:28:30 version 1.51.30.1, 2008/07/01 15:17:57
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
   // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // 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 20 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Karl schopmeyer (k.schopmeyer@opengroup.org)  
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_Value_h #ifndef Pegasus_Value_h
Line 33 
Line 37 
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/CIMType.h> #include <Pegasus/Common/CIMType.h>
   #include <Pegasus/Common/CIMObjectPath.h>
   #include <Pegasus/Common/CIMObject.h>
 #include <Pegasus/Common/CIMDateTime.h> #include <Pegasus/Common/CIMDateTime.h>
 #include <Pegasus/Common/Union.h>  #include <Pegasus/Common/Exception.h>
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
   #include <Pegasus/Common/Linkage.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   class CIMValueRep;
   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 CIMType.h 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 with no value. This 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 with only the Type. This constructor creates a NULL CIMValue      /**
         object with the array indicator set as shown and with the          Constructs a null CIMValue object with the specified type and
           array indicator.
           @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 with the Value constructor and a value.  This constructs a      /**
         CIMValue object with the type defined by the value constructor and the value          Constructs a CIMValue with the specified value and inferred type.
         installed          @param x The Boolean value to assign
         <pre>  
         ATTN: Add example  
         </pre>  
     */     */
     CIMValue(Boolean x) { _init(); set(x); }      CIMValue(Boolean x);
  
     /// Constructor      /**
     CIMValue(Uint8 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint8 value to assign
       */
       CIMValue(Uint8 x);
  
     /// Constructor      /**
     CIMValue(Sint8 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint8 value to assign
       */
       CIMValue(Sint8 x);
   
       /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint16 value to assign
       */
       CIMValue(Uint16 x);
   
       /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint16 value to assign
       */
       CIMValue(Sint16 x);
   
       /**
           Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint32 value to assign
       */
       CIMValue(Uint32 x);
  
     /// Constructor      /**
     CIMValue(Uint16 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint32 value to assign
       */
       CIMValue(Sint32 x);
  
     /// Constructor      /**
     CIMValue(Sint16 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint64 value to assign
       */
       CIMValue(Uint64 x);
  
     /// Constructor      /**
     CIMValue(Uint32 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint64 value to assign
       */
       CIMValue(Sint64 x);
  
     /// Constructor      /**
     CIMValue(Sint32 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Real32 value to assign
       */
       CIMValue(Real32 x);
  
     /// Constructor      /**
     CIMValue(Uint64 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Real64 value to assign
       */
       CIMValue(Real64 x);
  
     /// Constructor      /**
     CIMValue(Sint64 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Char16 value to assign
       */
       CIMValue(const Char16& x);
  
     /// Constructor      /**
     CIMValue(Real32 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The String value to assign
       */
       CIMValue(const String& x);
  
     /// Constructor      /**
     CIMValue(Real64 x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMDateTime value to assign
       */
       CIMValue(const CIMDateTime& x);
  
     /// Constructor      /**
     CIMValue(const Char16& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMObjectPath value to assign
       */
       CIMValue(const CIMObjectPath& x);
  
     /// Constructor      /**
     CIMValue(const String& x) { _init(); set(x); }          Constructs a CIMValue with 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.
       */
       CIMValue(const CIMObject& x);
  
     /// Constructor  #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
     CIMValue(const char* x) { _init(); set(x); }  #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
  
     /// Constructor      /**
     CIMValue(const CIMDateTime& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Boolean Array value to assign
       */
       CIMValue(const Array<Boolean>& x);
  
     /// Constructor      /**
     CIMValue(const CIMReference& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint8 Array value to assign
       */
       CIMValue(const Array<Uint8>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Boolean>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint8 Array value to assign
       */
       CIMValue(const Array<Sint8>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Uint8>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint16 Array value to assign
       */
       CIMValue(const Array<Uint16>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Sint8>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint16 Array value to assign
       */
       CIMValue(const Array<Sint16>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Uint16>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint32 Array value to assign
       */
       CIMValue(const Array<Uint32>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Sint16>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint32 Array value to assign
       */
       CIMValue(const Array<Sint32>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Uint32>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Uint64 Array value to assign
       */
       CIMValue(const Array<Uint64>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Sint32>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Sint64 Array value to assign
       */
       CIMValue(const Array<Sint64>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Uint64>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Real32 Array value to assign
       */
       CIMValue(const Array<Real32>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Sint64>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Real64 Array value to assign
       */
       CIMValue(const Array<Real64>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Real32>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The Char16 Array value to assign
       */
       CIMValue(const Array<Char16>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Real64>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The String Array value to assign
       */
       CIMValue(const Array<String>& x);
  
     /// Constructor      /**
     CIMValue(const Array<Char16>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMDateTime Array value to assign
       */
       CIMValue(const Array<CIMDateTime>& x);
  
     /// Constructor      /**
     CIMValue(const Array<String>& x) { _init(); set(x); }          Constructs a CIMValue with the specified value and inferred type.
           @param x The CIMObjectPath Array value to assign
       */
       CIMValue(const Array<CIMObjectPath>& x);
  
     /// Constructor      /**
     CIMValue(const Array<CIMDateTime>& x) { _init(); set(x); }          Constructs a CIMValue with 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.
       */
       CIMValue(const Array<CIMObject>& x);
  
     /// Constructor  #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
     CIMValue(const Array<CIMReference>& x) { _init(); set(x); }  #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       /**
           Constructs a CIMValue with the specified value and inferred type.
           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
  
     /// Constructor      /**
           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 =      /**
     CIMValue& operator=(const CIMValue& x)          Assigns the value from a specified CIMValue object.
     {          Note: If the specified CIMValue contains CIMObject or CIMInstance
         assign(x); return *this;          objects, they are cloned to prevent subsequent modification through
     }          the shared representation model.
           @param x The CIMValue object to copy
     /** assign - The method to assign one CIMValue object to another CIMValue          @return A reference to this CIMValue object with the new assignment
     object.      */
       CIMValue& operator=(const CIMValue& x);
  
       /**
           Assigns the value from a specified 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
     */     */
     void assign(const CIMValue& x);     void assign(const CIMValue& x);
  
     /** clear - Clears the attributes and value of the CIMValue object.      /**
     <pre>          Resets to a null value with type Boolean and isArray=false.
     ATTNDOC:  
     </pre>  
     */     */
     void clear();     void clear();
  
     /** typeCompatible - 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. Else returns false.          @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;
     {  
         return _type == x._type && _isArray == x._isArray;  
     }  
  
     /** isArray - Determines if the value is an array      /**
         @return TRUE if the value is an array          Indicates whether the value is an array.
           @return A Boolean indicating whether the value is an array.
     */     */
     Boolean isArray() const { return _isArray; }      Boolean isArray() const;
  
     /** Returns 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 into the value.          no value can be retrieved from it.
         If a CIMValue object is Null, any get on that object          @return A Boolean indicating whether the value is null.
         will create an exception.  
         @return Returns True if the CIMValue object is Null  
     */     */
     Boolean isNull() const { return _isNull; }      Boolean isNull() const;
  
     /** getArraySize = Returns 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;
  
     /** getType - Gets the CIMType attribute for the CIMValue.      /**
         The CIMType is defined in ATTN:          Gets the value type.
         @return Returns the CIMType value          @return A CIMType indicating the type of the value.
     */     */
     CIMType getType() const      CIMType getType() const;
     {  
         return CIMType(_type);  
     }  
  
     /** setNullvalue - Sets the CIMType, the Array indicator and if it is      /**
         the arraytype, the Arraysize of a CIMValue and sets the isNull          Sets the value to null with the specified type and array indicator.
         Attribute.  This function is used to set up CIMValues an NULL but          @param type The CIMType of the value
         with valid CIMType and array characteristics (ex. when update from          @param isArray A Boolean indicating whether the value is of array type
         XML)          @param arraySize An integer specifying the size of the array, if the
         @param type - The CIMType for this CIMValue              CIMValue is for an array of a fixed size.  This value is ignored
         @paramisArray - Boolean indicating whether this is an array CIMValue              if the isArray argument is false.
         @param arraySize (optional)  Uint32parameter indicating the array  
         size  
         @return void  
         <pre>  
             CIMValue value;                   // Create a CIMValue object  
             value.setNullValue(CIMType::BOOLEAN, false);  // Set it  
         </pre>  
     */     */
     void setNullValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);     void setNullValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);
  
     /** set - Sets the type, Array attribute and puts the value provided      /**
         into the value of the target CIMValue. This function sets the          Sets the CIMValue to the specified value and inferred type.
         CIMValue to nonNull also. The result is a complete CIMValue object          @param x The Boolean value to assign
         All of the CIMTypes defined in ATTN: and the Array types defined in  
         ATTN: may be set.  
         @param x Typed value (ex. Boolean(true).  
         @return void  
         <pre>  
             CIMValue x;  
             x.set(Uint16(9));  
         </pre>  
     */     */
     void set(Boolean x);     void set(Boolean x);
  
     /// Set      /**
           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);
     ///  
     void set(const char* 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);
     ///  
     void set(const CIMReference& x);      /**
     ///          Sets the CIMValue to the specified value and inferred type.
           @param x The CIMObjectPath value to assign
       */
       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);
   
   #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);
     ///  
     void set(const Array<CIMReference>& x);  
  
     /** get - Gets the value of a CIMValue      /**
         @param ATTNDOC:          Sets the CIMValue to the specified value and inferred type.
         @return ATTNDOC:          @param x The CIMObjectPath Array value to assign
       */
       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);
   
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       /**
           Sets the CIMValue to the specified value and inferred type.
           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.
       */
       void set(const Array<CIMInstance>& x);
   #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 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(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;     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;     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;     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;     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>
               Uint32 v;
               CIMValue value = property.getValue();
               if ((value.getType() == CIMTYPE_UINT32) && (!value.isNull()))
                   value.get(v);
           </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(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;
     ///  
     void get(CIMReference& 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;
   
       /**
           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;
   
   #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;
     ///  
     void get(Array<CIMReference>& x) const;  
  
     /** toXML - Converts a CIMValue object to XML. The XML is appended      /**
         to the Array provided with the call.  Returns the result as an          Gets the value of the CIMValue.  The caller should first verify that
         XML element wrapped in the <VALUE>, <VALUE.ARRAY>, <VALUE.REFERENCE>,          the value is of the expected type and is not null.  The behavior is
         or <VALUE.REFARRAY> tags. If the CIMValue is Null, no element is          undefined for null values.
         returned.          @param x Output CIMObjectPath Array into which the value is stored.
         @paramout Sint8 Array to hold the XML representation          @exception TypeMismatchException If the value type does not match the
         @return Returns the XML representation of the CIMValue              output parameter.
         object in the input parameter out.      */
     */      void get(Array<CIMObjectPath>& x) const;
     void toXml(Array<Sint8>& out) const;  
       /**
     /** toXML - Converts a CIMValue object to XML. There is no input          Gets the value of the CIMValue.  The caller should first verify that
         parameter and the result is returned as a String rather          the value is of the expected type and is not null.  The behavior is
         than appended to an 8-bit array as above.  Returns the          undefined for null values.
         element as value wrapped in the <VALUE>, <VALUE.ARRAY>,          @param x Output CIMObject Array into which the value is stored.
         <VALUE.REFERENCE>, or <VALUE.REFARRAY> tags. If the          @exception TypeMismatchException If the value type does not match the
         CIMValue is Null, no element is returned.              output parameter.
         @return Returns the XML representation of the CIMValue      */
         object in String form.      void get(Array<CIMObject>& x) const;
     */  
     String toXml() const;  #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     /** CIMMethod print - Format and print the Value as XML to std output      /**
         stream          Gets the value of the CIMValue.  The caller should first verify that
         @return None          the value is of the expected type and is not null.  The behavior is
         <PRE>          undefined for null values.
         Example:          @param x Output CIMInstance Array into which the value is stored.
             CIMValue value(Boolean(true));          @exception TypeMismatchException If the value type does not match the
             value.print();        // Prints "true"              output parameter.
         </PRE>      */
     */      void get(Array<CIMInstance>& x) const;
     void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const;  #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
     /** toMof - Converts a CIMValueObject to Mof.  
         @out Sint8 Array to hold the Mof representation      /**
         @return Returns the Mof representation of the CIMValue          Compares with another CIMValue object for equality.
         object in the input parameter out.          @param x The CIMValue with which to compare
     */          @return A Boolean indicating whether they are identical in type,
     void toMof(Array<Sint8>& out) const;              array attributes, and value.
       */
     /** toString - Converts the CIMvalue to a string.  Should only be      Boolean equal(const CIMValue& x) const;
             used for output purposes.  To get an actual String value, use  
             get(String &).      /**
         @return - String output for CIMValue.          Converts a CIMValue to a String.  This method should only be
         @exception - Throws exception CIMValueInvalidType if the CIMValue          used for diagnostic output purposes.  To get an actual String value,
             has an invalid type. Normally this is a Pegasus internal error.          use get(String &).
         <PRE>          @return A String representation of the value.
         Example:  
             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
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Constructs a CIMValue with the specified value and type Sint8.
           (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);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Constructs a CIMValue with the specified value and type Sint8 Array.
           (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);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Sets the CIMValue to the specified value and type Sint8.
           (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);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Sets the CIMValue to the specified value and type Sint8 Array.
           (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);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Gets the Sint8 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.
           (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;
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Gets the Sint8 Array 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.
           (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;
   #endif
   
 private: private:
  
     void _init();      void _get(const String*& data, Uint32& size) const;
  
     CIMType _type;      CIMValueRep* _rep;
     Boolean _isArray;  
     Boolean _isNull;  
     Union _u;  
  
     friend class CIMMethodRep;     friend class CIMMethodRep;
     friend class CIMParameterRep;     friend class CIMParameterRep;
     friend class CIMPropertyRep;     friend class CIMPropertyRep;
     friend class CIMQualifierRep;     friend class CIMQualifierRep;
     friend class CIMQualifierDeclRep;     friend class CIMQualifierDeclRep;
     PEGASUS_COMMON_LINKAGE friend Boolean operator==(      friend class BinaryStreamer;
         const CIMValue& x,      friend class XmlWriter;
         const CIMValue& y);  
 }; };
  
   /**
       Compares two CIMValue objects for equality.
       @param x First CIMValue to compare
       @param y Second CIMValue to compare
       @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);
  
 inline Boolean operator!=(const CIMValue& x, const CIMValue& y)  /**
 {      Compares two CIMValue objects for inequality.
     return !operator==(x, y);      @param x First CIMValue to compare
 }      @param y Second CIMValue to compare
       @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);
  
 #define PEGASUS_ARRAY_T CIMValue #define PEGASUS_ARRAY_T CIMValue
 # include "ArrayInter.h"  # include <Pegasus/Common/ArrayInter.h>
 #undef PEGASUS_ARRAY_T #undef PEGASUS_ARRAY_T
  
 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.15  
changed lines
  Added in v.1.51.30.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2