/[escript]/branches/more_shared_ptrs_from_1812/escript/src/Data.h
ViewVC logotype

Diff of /branches/more_shared_ptrs_from_1812/escript/src/Data.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 559 by jgs, Thu Feb 23 01:43:44 2006 UTC revision 562 by jgs, Thu Feb 23 05:03:16 2006 UTC
# Line 1492  Data::dp_algorithm(BinaryFunction operat Line 1492  Data::dp_algorithm(BinaryFunction operat
1492      return result;      return result;
1493    } else if (isTagged()) {    } else if (isTagged()) {
1494      DataTagged* dataT=dynamic_cast<DataTagged*>(m_data.get());      DataTagged* dataT=dynamic_cast<DataTagged*>(m_data.get());
     DataTagged::TagListType keys;  
     DataTagged::DataMapType::const_iterator i;  
     for (i=dataT->getTagLookup().begin();i!=dataT->getTagLookup().end();i++) {  
       keys.push_back(i->first);  
     }  
1495      DataArrayView::ShapeType viewShape;      DataArrayView::ShapeType viewShape;
1496      DataArrayView::ValueType viewData(1);      DataArrayView::ValueType viewData(1);
1497      viewData[0]=0;      viewData[0]=0;
1498      DataArrayView defaultValue(viewData,viewShape);      DataArrayView defaultValue(viewData,viewShape);
1499        DataTagged::TagListType keys;
1500      DataTagged::ValueListType values;      DataTagged::ValueListType values;
1501      values.push_back(defaultValue);      DataTagged::DataMapType::const_iterator i;
1502        for (i=dataT->getTagLookup().begin();i!=dataT->getTagLookup().end();i++) {
1503          keys.push_back(i->first);
1504          values.push_back(defaultValue);
1505        }
1506      Data result(keys,values,defaultValue,getFunctionSpace());      Data result(keys,values,defaultValue,getFunctionSpace());
1507      DataTagged* resultT=dynamic_cast<DataTagged*>(result.m_data.get());      DataTagged* resultT=dynamic_cast<DataTagged*>(result.m_data.get());
1508      EsysAssert((dataT!=0), "Programming error - casting data to DataTagged.");      EsysAssert((dataT!=0), "Programming error - casting data to DataTagged.");

Legend:
Removed from v.559  
changed lines
  Added in v.562

  ViewVC Help
Powered by ViewVC 1.1.26