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

Diff for /pegasus/src/Pegasus/Common/SCMOInstance.h between version 1.1.2.23 and 1.1.2.31

version 1.1.2.23, 2009/10/13 09:36:35 version 1.1.2.31, 2009/10/30 13:22:31
Line 217 
Line 217 
         Uint32& size ) const;         Uint32& size ) const;
  
     /**     /**
      * Gets the property name, type, and value addressed by a positional index.  
      * The property name and value has to be copied by the caller !  
      * @param pos The positional index of the property  
      * @param pname Returns the property name as '\0' terminated string.  
      *              Has to be copied by caller.  
      *              It is set to NULL if rc != SCMO_OK.  
      * @param value Returns an absolute pointer to the value of property.  
      *                  Sub-pointers are NOT resolved!  
      *               The value has to be copied by the caller !  
      *               It returns NULL if rc != SCMO_OK.  
      * @param valueBase Returns an absolute pointer to the base of value,  
      *                  because subsequent pointers in the value are NOT  
      *                  resolved.  
      * @param propDef Returns an absolute pointer to the property definition  
      *                  Sub-pointers are NOT resolved!  
      *             It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND.  
      *  
      * @return     SCMO_OK  
      *             SCMO_NULL_VALUE : The value is a null value.  
      *             SCMO_INDEX_OUT_OF_BOUND : Given index not found  
      *  
      */  
     SCMO_RC getPropertyAt(  
         Uint32 pos,  
         SCMBValue** value,  
         const char ** valueBase,  
         SCMBClassProperty ** propDef) const;  
   
     /**  
      * Gets the type and value of the named property.      * Gets the type and value of the named property.
      * The value has to be copied by the caller !      * The value has to be copied by the caller !
      * @param name The property name      * @param name The property name
Line 461 
Line 432 
         const SCMBUnion* keyvalue);         const SCMBUnion* keyvalue);
  
     /**     /**
        * Clears all key bindings in an instance.
        * Warning: External references are freed but only the internal
        * control structures are resetted. No memory is freed and at setting
        * new key bindings the instance will grow in memory usage.
        **/
       void clearKeyBindings();
   
       /**
      * Gets the key binding count.      * Gets the key binding count.
      * @return the number of key bindings set.      * @return the number of key bindings set.
      */      */
Line 518 
Line 497 
         const SCMBUnion** keyvalue) const;         const SCMBUnion** keyvalue) const;
  
     /**     /**
      * Determines whether the object has been initialized.       * Determines whether the c++ object has been initialized.
      * @return True if the object has not been initialized, false otherwise.       * @return True if the c++ object has not been initialized, false otherwise.
      */      */
     Boolean isUninitialized( ) const {return (0 == inst.base); };     Boolean isUninitialized( ) const {return (0 == inst.base); };
  
     /**     /**
        * Determines whether the instance is used as a class container.
        * @return True if the instance is used as a class container only.
        */
       Boolean getIsClassOnly( ) const
       {
           return inst.hdr->flags.isClassOnly;
       }
   
       /**
        * To mark if this instance is a class only container.
        */
       void setIsClassOnly( Boolean b )
       {
           inst.hdr->flags.isClassOnly = b;
       }
   
       /**
      * Determies if two objects are referencing to the same instance      * Determies if two objects are referencing to the same instance
      * @return True if the objects are referencing to the some instance.      * @return True if the objects are referencing to the some instance.
      */      */
Line 536 
Line 532 
     void setHostName(const char* hostName);     void setHostName(const char* hostName);
  
     /**     /**
        * Sets the provided host name unchecked at the instance.
        * @param hostName The host name as UTF8.
        * @param len The strlen of the host name.
        */
       void setHostName_l(const char* hostName, Uint32 len);
   
       /**
      * Get the host name of the instance. The caller has to make a copy !      * Get the host name of the instance. The caller has to make a copy !
      * @return The host name as UTF8.      * @return The host name as UTF8.
      */      */
Line 543 
Line 546 
  
     /**     /**
      * Get the host name of the instance.      * Get the host name of the instance.
      * @param Return length of result string.       * @param Return strlen of result string.
      * @return The class name as UTF8.      * @return The class name as UTF8.
      */      */
     const char* getHostName_l(Uint64 & length) const;     const char* getHostName_l(Uint64 & length) const;
Line 556 
Line 559 
     void setClassName(const char* className);     void setClassName(const char* className);
  
     /**     /**
        * Sets the provided class name at the instance. By caling this function
        * the instance is in an inconsitacne state and is maked as isCompromised.
        * @param className The class name as UTF8.
        * @param len The strlen of the name space.
        */
       void setClassName_l(const char* className, Uint64 len);
   
       /**
      * Get the class name of the instance. The caller has to make a copy !      * Get the class name of the instance. The caller has to make a copy !
      * @return The class name as UTF8.      * @return The class name as UTF8.
      */      */
Line 563 
Line 574 
  
     /**     /**
      * Get the class name of the instance. The caller has to make a copy !      * Get the class name of the instance. The caller has to make a copy !
      * @param Return length of result string.       * @param Return strlen of result string.
      * @return The class name as UTF8.      * @return The class name as UTF8.
      */      */
     const char* getClassName_l(Uint64 & length) const;     const char* getClassName_l(Uint64 & length) const;
Line 577 
Line 588 
     void setNameSpace(const char* nameSpace);     void setNameSpace(const char* nameSpace);
  
     /**     /**
        * Sets the provided name space name unchecked at the instance.
        * By caling this function the instance is in an inconsitacne state and
        * is maked as isCompromised.
        * @param nameSpaceName The name space name as UTF8.
        * @param len The strlen of the name space.
        */
       void setNameSpace_l(const char* nameSpace, Uint32 len);
   
       /**
      * Get the name space of the instance. The caller has to make a copy !      * Get the name space of the instance. The caller has to make a copy !
      * @return The name space as UTF8.      * @return The name space as UTF8.
      */      */
Line 584 
Line 604 
  
     /**     /**
      * Get the class name of the instance. The caller has to make a copy !      * Get the class name of the instance. The caller has to make a copy !
      * @param Return length of result string.       * @param Return strlen of result string.
      * @return The class name as UTF8.      * @return The class name as UTF8.
      */      */
     const char* getNameSpace_l(Uint64 & length) const;     const char* getNameSpace_l(Uint64 & length) const;
Line 676 
Line 696 
  
     void _destroyExternalReferences();     void _destroyExternalReferences();
  
       void _destroyExternalKeyBindings();
   
     void _copyExternalReferences();     void _copyExternalReferences();
  
     void _initSCMOInstance(SCMOClass* pClass);     void _initSCMOInstance(SCMOClass* pClass);
  
     void _setCIMInstance(const CIMInstance& cimInstance);     void _setCIMInstance(const CIMInstance& cimInstance);
  
       void _getPropertyAt(
           Uint32 pos,
           SCMBValue** value,
           const char ** valueBase,
           SCMBClassProperty ** propDef) const;
   
     SCMO_RC _getPropertyAtNodeIndex(     SCMO_RC _getPropertyAtNodeIndex(
         Uint32 pos,         Uint32 pos,
         const char** pname,         const char** pname,
Line 833 
Line 861 
     friend class SCMOXmlWriter;     friend class SCMOXmlWriter;
 }; };
  
   inline void SCMOInstance::_getPropertyAt(
       Uint32 pos,
       SCMBValue** value,
       const char ** valueBase,
       SCMBClassProperty ** propDef) const
   {
       Uint32 node;
       // is filtering on ?
       if (inst.hdr->flags.isFiltered)
       {
           // Get absolut pointer to property filter index map of the instance
           Uint32* propertyFilterIndexMap =
           (Uint32*)&(inst.base[inst.hdr->propertyFilterIndexMap.start]);
           // get the real node index of the property.
           node = propertyFilterIndexMap[pos];
       }
       else
       {
           // the index is used as node index.
           node = pos;
       }
   
       SCMBValue* theInstPropNodeArray =
           (SCMBValue*)&(inst.base[inst.hdr->propertyArray.start]);
   
       // create a pointer to property node array of the class.
       Uint64 idx = inst.hdr->theClass->cls.hdr->propertySet.nodeArray.start;
       SCMBClassPropertyNode* theClassPropNodeArray =
           (SCMBClassPropertyNode*)&(inst.hdr->theClass->cls.base)[idx];
   
       // return the absolute pointer to the property definition
       *propDef= &(theClassPropNodeArray[node].theProperty);
   
       // need check if property set or not, if not set use the default value
       if (theInstPropNodeArray[node].flags.isSet)
       {
           // return the absolute pointer to the property value in the instance
           *value = &(theInstPropNodeArray[node]);
           *valueBase = inst.base;
       }
       else
       {
           // return the absolute pointer to
           *value = &(theClassPropNodeArray[node].theProperty.defaultValue);
           *valueBase = inst.hdr->theClass->cls.base;
       }
   }
  
 #define PEGASUS_ARRAY_T SCMOInstance #define PEGASUS_ARRAY_T SCMOInstance
 # include <Pegasus/Common/ArrayInter.h> # include <Pegasus/Common/ArrayInter.h>


Legend:
Removed from v.1.1.2.23  
changed lines
  Added in v.1.1.2.31

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2