(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.2 and 1.5

version 1.2, 2009/12/15 11:39:34 version 1.5, 2011/11/04 09:04:53
Line 390 
Line 390 
     void buildKeyBindingsFromProperties();     void buildKeyBindingsFromProperties();
  
     /**     /**
      * Set/replace a property filter on an instance.  
      * The filter is a white list of property names.  
      * A property part of the list can be accessed by name or index and  
      * is eligible to be returned to requester.  
      * Key properties can not be filtered. They are always a part of the  
      * instance. If a key property is not part of the property list,  
      * it will not be filtered out.  
      * @param propertyList Is an NULL terminated array of char* to  
      * property names  
      */  
     void setPropertyFilter(const char **propertyList);  
   
     /**  
      * Gets the hash index for the named property. Filtering is ignored.      * Gets the hash index for the named property. Filtering is ignored.
      * @param theName The property name      * @param theName The property name
      * @param pos Returns the hash index.      * @param pos Returns the hash index.
Line 414 
Line 401 
  
     /**     /**
      * Set/replace a property in the instance at node index.      * Set/replace a property in the instance at node index.
      * Note: If node is filtered, the property is not set but the return value  
      * is still SCMO_OK.  
      * @param index The node index.      * @param index The node index.
      * @param type The CIMType of the property      * @param type The CIMType of the property
      * @param pInVal A pointer to the value to be set at the named property.      * @param pInVal A pointer to the value to be set at the named property.
Line 812 
Line 797 
         if ( 1 < inst.hdr->refCount.get() )         if ( 1 < inst.hdr->refCount.get() )
         {         {
             SCMBInstance_Main * oldRef = inst.hdr;             SCMBInstance_Main * oldRef = inst.hdr;
               SCMBMgmt_Header* oldMgmt = inst.mem;
   
             _clone();             _clone();
             if (oldRef->refCount.decAndTestIfZero())             if (oldRef->refCount.decAndTestIfZero())
             {             {
                 // All external references has to be destroyed.                 // All external references has to be destroyed.
                 _destroyExternalReferencesInternal((SCMBMgmt_Header*)oldRef);                  _destroyExternalReferencesInternal(oldMgmt);
                 // The class has also be dereferenced.                 // The class has also be dereferenced.
                 delete oldRef->theClass.ptr;                 delete oldRef->theClass.ptr;
                 free((void*)oldRef);                 free((void*)oldRef);
Line 930 
Line 917 
  
     void _copyKeyBindings(SCMOInstance& targetInst) const;     void _copyKeyBindings(SCMOInstance& targetInst) const;
  
     Uint32 _initPropFilterWithKeys();  
   
     void _setPropertyInPropertyFilter(Uint32 i);  
   
     Boolean _isPropertyInFilter(Uint32 i) const;  
   
     void _clearPropertyFilter();  
   
     void _setKeyBindingFromSCMBUnion(     void _setKeyBindingFromSCMBUnion(
         CIMType type,         CIMType type,
         const SCMBUnion& u,         const SCMBUnion& u,
Line 1010 
Line 989 
     const char ** valueBase,     const char ** valueBase,
     SCMBClassProperty ** propDef) const     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* theInstPropNodeArray =
         (SCMBValue*)&(inst.base[inst.hdr->propertyArray.start]);         (SCMBValue*)&(inst.base[inst.hdr->propertyArray.start]);
  
Line 1035 
Line 998 
         (SCMBClassPropertyNode*)&(inst.hdr->theClass.ptr->cls.base)[idx];         (SCMBClassPropertyNode*)&(inst.hdr->theClass.ptr->cls.base)[idx];
  
     // return the absolute pointer to the property definition     // return the absolute pointer to the property definition
     *propDef= &(theClassPropNodeArray[node].theProperty);      *propDef= &(theClassPropNodeArray[pos].theProperty);
  
     // need check if property set or not, if not set use the default value     // need check if property set or not, if not set use the default value
     if (theInstPropNodeArray[node].flags.isSet)      if (theInstPropNodeArray[pos].flags.isSet)
     {     {
         // return the absolute pointer to the property value in the instance         // return the absolute pointer to the property value in the instance
         *value = &(theInstPropNodeArray[node]);          *value = &(theInstPropNodeArray[pos]);
         *valueBase = inst.base;         *valueBase = inst.base;
     }     }
     else     else
     {     {
         // return the absolute pointer to         // return the absolute pointer to
         *value = &(theClassPropNodeArray[node].theProperty.defaultValue);          *value = &(theClassPropNodeArray[pos].theProperty.defaultValue);
         *valueBase = inst.hdr->theClass.ptr->cls.base;         *valueBase = inst.hdr->theClass.ptr->cls.base;
     }     }
 } }


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2