(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.36 and 1.51

version 1.36, 2004/05/18 11:03:38 version 1.51, 2006/11/07 21:30:36
Line 1 
Line 1 
 //%2003////////////////////////////////////////////////////////////////////////  //%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.
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
 // IBM Corp.; EMC Corporation, The Open Group. // 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 23 
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)  
 //              Carol Ann Krug Graves, Hewlett-Packard Company  
 //                (carolann_graves@hp.com)  
 //              Amit K Arora, IBM (amita@in.ibm.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_Value_h #ifndef Pegasus_Value_h
Line 40 
Line 38 
 #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/CIMObjectPath.h>
   #include <Pegasus/Common/CIMObject.h>
 #include <Pegasus/Common/CIMDateTime.h> #include <Pegasus/Common/CIMDateTime.h>
 #include <Pegasus/Common/Exception.h> #include <Pegasus/Common/Exception.h>
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/Linkage.h> #include <Pegasus/Common/Linkage.h>
 #include <Pegasus/Common/AutoPtr.h>  
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 class CIMValueRep; 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
Line 116 
Line 120 
     /// Constructor.     /// Constructor.
     CIMValue(const CIMObjectPath& x);     CIMValue(const CIMObjectPath& x);
  
       /** Constructor.
           Note: Constructing a CIMValue with an uninitialized CIMObject is not
           defined and results in a thrown UninitializedObjectException.
           Note: The input CIMObject will be cloned before putting it into the
           value of the constructed 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.
       */
       CIMValue(const CIMObject& x);
   
       /// Constructor.
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       CIMValue(const CIMInstance& x);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
     /// Constructor.     /// Constructor.
     CIMValue(const Array<Boolean>& x);     CIMValue(const Array<Boolean>& x);
  
Line 161 
Line 182 
     /// Constructor.     /// Constructor.
     CIMValue(const Array<CIMObjectPath>& x);     CIMValue(const Array<CIMObjectPath>& x);
  
     /// Constructor.      /** Constructor.
           Note: Constructing a CIMValue with an uninitialized CIMObject anywhere
           in the input array is not defined and results in a thrown
           UninitializedObjectException.
           Note: Each CIMObject in the input Array will be cloned before putting
           the Array into the value of the constructed 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.
       */
       CIMValue(const Array<CIMObject>& x);
   
       /// Constructor.
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       CIMValue(const Array<CIMInstance>& x);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
       /** Constructor.
           Note: If the input type is CIMObject, it/they will be cloned before
           putting it into the value of the constructed 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.
       */
     CIMValue(const CIMValue& x);     CIMValue(const CIMValue& x);
  
     /// Destructor.     /// Destructor.
     ~CIMValue();     ~CIMValue();
  
     /// Operator =      /** Operator =
           Note: If the right hand side 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.
       */
     CIMValue& operator=(const CIMValue& x);     CIMValue& operator=(const CIMValue& x);
  
     /** Assigns one CIMValue object to another CIMValue object.     /** Assigns one CIMValue object to another CIMValue object.
         @param x - CIMValue object to be used for assignment.         @param x - CIMValue object to be used for assignment.
           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 assign(const CIMValue& x);     void assign(const CIMValue& x);
  
Line 233 
Line 286 
             CIMValue x;             CIMValue x;
             x.set(Uint16(9));             x.set(Uint16(9));
         </pre>         </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);
  
Line 265 
Line 325 
     ///     ///
     void set(const CIMObjectPath& x);     void set(const CIMObjectPath& x);
     ///     ///
       void set(const CIMObject& x);
       ///
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       void set(const CIMInstance& x);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
       ///
     void set(const Array<Boolean>& x);     void set(const Array<Boolean>& x);
     ///     ///
     void set(const Array<Uint8>& x);     void set(const Array<Uint8>& x);
Line 294 
Line 362 
     void set(const Array<CIMDateTime>& x);     void set(const Array<CIMDateTime>& x);
     ///     ///
     void set(const Array<CIMObjectPath>& x);     void set(const Array<CIMObjectPath>& x);
       ///
       void set(const Array<CIMObject>& x);
       ///
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       void set(const Array<CIMInstance>& x);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
  
     /** Gets the value of a CIMValue.     /** Gets the value of a CIMValue.
         Note: Before using get, the caller should use getType () and isNull ()         Note: Before using get, the caller should use getType () and isNull ()
         to ensure that the value is not null, and is of the correct type.         to ensure that the value is not null, and is of the correct type.
  
           The behavior of get is undefined when the value is null.
   
         @param Variable in which to return the value.         @param Variable in which to return the value.
         @exception TypeMismatchException If the CIMValue type is not compatible         @exception TypeMismatchException If the CIMValue type is not compatible
                    with the type of the output parameter.                    with the type of the output parameter.
Line 345 
Line 423 
     ///     ///
     void get(CIMObjectPath& x) const;     void get(CIMObjectPath& x) const;
     ///     ///
       void get(CIMObject& x) const;
       ///
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       void get(CIMInstance& x) const;
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
       ///
     void get(Array<Boolean>& x) const;     void get(Array<Boolean>& x) const;
     ///     ///
     void get(Array<Uint8>& x) const;     void get(Array<Uint8>& x) const;
     //////      ///
     void get(Array<Sint8>& x) const;     void get(Array<Sint8>& x) const;
     ///     ///
     void get(Array<Uint16>& x) const;     void get(Array<Uint16>& x) const;
Line 374 
Line 460 
     void get(Array<CIMDateTime>& x) const;     void get(Array<CIMDateTime>& x) const;
     ///     ///
     void get(Array<CIMObjectPath>& x) const;     void get(Array<CIMObjectPath>& x) const;
       ///
       void get(Array<CIMObject>& x) const;
       ///
   #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       void get(Array<CIMInstance>& x) const;
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
  
     /** Compares with another CIMValue object for equality.     /** Compares with another CIMValue object for equality.
         @param x - CIMValue to compare with.         @param x - CIMValue to compare with.
Line 394 
Line 488 
         */         */
     String toString() const;     String toString() const;
  
   #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Constructor.  (Note: This constructor exists solely to support binary
           compatibility with a previous definition of the Sint8 type.)
       */
       CIMValue(char x);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Constructor.  (Note: This constructor exists solely to support binary
           compatibility with a previous definition of the Sint8 type.)
       */
       CIMValue(const Array<char>& x);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Sets an Sint8 value.  (Note: This method exists solely to support
           binary compatibility with a previous definition of the Sint8 type.)
       */
       void set(char x);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Sets an Sint8 array value.  (Note: This method exists solely to support
           binary compatibility with a previous definition of the Sint8 type.)
       */
       void set(const Array<char>& x);
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Gets an Sint8 value.  (Note: This method exists solely to support
           binary compatibility with a previous definition of the Sint8 type.)
       */
       void get(char& x) const;
   
       /**
           <I><B>Deprecated Interface</B></I><BR>
           Gets an Sint8 array value.  (Note: This method exists solely to support
           binary compatibility with a previous definition of the Sint8 type.)
       */
       void get(Array<char>& x) const;
   #endif
   
 private: private:
  
     AutoPtr<CIMValueRep> _rep;//PEP101      void _get(const String*& data, Uint32& size) const;
   
       CIMValueRep* _rep;
  
     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;
       friend class BinaryStreamer;
       friend class XmlWriter;
 }; };
  
 /** operator == compares two CIMValue objects for equality. /** operator == compares two CIMValue objects for equality.
Line 427 
Line 569 
  
 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.36  
changed lines
  Added in v.1.51

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2