(file) Return to CQLValueRep.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / CQL

Diff for /pegasus/src/Pegasus/CQL/CQLValueRep.cpp between version 1.24 and 1.25

version 1.24, 2006/01/30 16:16:39 version 1.25, 2006/05/02 20:26:58
Line 327 
Line 327 
           _isResolved = true;           _isResolved = true;
           return;           return;
         }         }
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       CIMType propObjType = propObj.getType();
       if(index == IdSize-1)
       {
           _process_value(propObj,Idstrings[index],inQueryCtx);
           return;
       }
       else if((propObjType != CIMTYPE_OBJECT &&
           propObjType != CIMTYPE_INSTANCE) ||
           (propObj.getValue().isNull()))
       {
           // Object is not embedded.
           _valueType = CQLValue::Null_type;
           _isResolved = true;
           return;
       }
       CIMValue propValue = propObj.getValue();
       // If the property is an embeddedInstance, convert to an object
       if(propObjType == CIMTYPE_INSTANCE)
       {
           CIMInstance tmpInst;
           propValue.get(tmpInst);
           propValue = CIMValue((CIMObject)tmpInst);
       }
       propValue.get(objectContext);
   #else
       if(index == IdSize-1)       if(index == IdSize-1)
         {         {
           _process_value(propObj,Idstrings[index],inQueryCtx);           _process_value(propObj,Idstrings[index],inQueryCtx);
Line 343 
Line 367 
           return;           return;
         }         }
       propObj.getValue().get(objectContext);       propObj.getValue().get(objectContext);
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
                 if(!objectContext.isInstance())                 if(!objectContext.isInstance())
                 {                 {
                         MessageLoaderParms mparms("CQL.CQLValueRep.OBJECT_CONTEXT_NOT_INSTANCE",                         MessageLoaderParms mparms("CQL.CQLValueRep.OBJECT_CONTEXT_NOT_INSTANCE",
Line 367 
Line 392 
       _valueType = CQLValue::CIMObject_type;       _valueType = CQLValue::CIMObject_type;
       _isResolved = true;       _isResolved = true;
     }     }
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     else if(propObj.getType() == CIMTYPE_INSTANCE)
     {
         CIMInstance cimInstance;
         propObj.getValue().get(cimInstance);
   
         _theValue.set((CIMObject)cimInstance.clone());
         _valueType = CQLValue::CIMObject_type;
         _isResolved = true;
     }
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
   else // Primitive   else // Primitive
     {     {
       if(_id.isArray())       if(_id.isArray())
Line 1490 
Line 1526 
             break;             break;
           }           }
         case CIMTYPE_OBJECT:         case CIMTYPE_OBJECT:
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       case CIMTYPE_INSTANCE:
           {           {
           Boolean isInstance = cv.getType() == CIMTYPE_INSTANCE;
             if(key == -1)             if(key == -1)
               {               {
                 _theValue = cv;                 _theValue = cv;
               }               }
             else             else
               {               {
               if(isInstance)
               {
                 Array<CIMInstance> _inst;
                 cv.get(_inst);
                 _theValue.set((CIMObject)(_inst[index]));
               }
               else
               {
                 Array<CIMObject> _obj;                 Array<CIMObject> _obj;
                 cv.get(_obj);                 cv.get(_obj);
                 _theValue.set(_obj[index]);                 _theValue.set(_obj[index]);
               }               }
           }
   
             _valueType = CQLValue::CIMObject_type;             _valueType = CQLValue::CIMObject_type;
             break;             break;
           }           }
   #else
       {
               if(key == -1)
                 {
                   _theValue = cv;
                 }
               else
                 {
                   Array<CIMObject> _obj;
                   cv.get(_obj);
                   _theValue.set(_obj[index]);
                 }
               _valueType = CQLValue::CIMObject_type;
               break;
             }
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         default:         default:
            MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"),            MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"),
                                     String("Unable to set internal object type: $0."),                                     String("Unable to set internal object type: $0."),
Line 1634 
Line 1699 
             _valueType = CQLValue::CIMObject_type;             _valueType = CQLValue::CIMObject_type;
             break;             break;
           }           }
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       case CIMTYPE_INSTANCE:
       {
           // Convert the value into an Object value
           CIMValue convertedValue(CIMTYPE_OBJECT, false);
           CIMInstance tmpInst;
           cv.get(tmpInst);
           convertedValue.set((CIMObject)tmpInst);
           _theValue = convertedValue;
           _valueType = CQLValue::CIMObject_type;
           break;
       }
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         default:         default:
            MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"),            MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"),
                                     String("Unable to set internal object type: $0."),                                     String("Unable to set internal object type: $0."),
Line 2031 
Line 2109 
           }           }
         break;         break;
       }       }
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       case CIMTYPE_INSTANCE:
       {
           Array<CIMInstance> tmpInst;
           _in1.get(tmpInst);
           for(Uint32 i = 0; i < tmpInst.size(); ++i)
           {
               _cqlVal1.append(CQLValue((CIMObject)tmpInst[i]));
           }
           break;
       }
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     default:     default:
       MessageLoaderParms mload(String("CQL.CQLValueRep.INVALID_ARRAY_COMPARISON"),       MessageLoaderParms mload(String("CQL.CQLValueRep.INVALID_ARRAY_COMPARISON"),
                                String("Invalid array comparison type: $0."),                                String("Invalid array comparison type: $0."),
Line 2110 
Line 2200 
           {           {
             _cqlVal2.append(CQLValue(_obj2[i]));             _cqlVal2.append(CQLValue(_obj2[i]));
           }           }
   #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
       case CIMTYPE_INSTANCE:
       {
           Array<CIMObject> tmpInst;
           _in2.get(tmpInst);
           for(Uint32 i = 0; i < tmpInst.size(); ++i)
           {
               _cqlVal2.append(CQLValue((CIMObject)tmpInst[i]));
           }
       }
   #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         break;         break;
       }       }
     default:     default:


Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2