/[escript]/trunk/escript/src/Data.cpp
ViewVC logotype

Diff of /trunk/escript/src/Data.cpp

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

revision 1117 by gross, Fri Apr 13 03:39:49 2007 UTC revision 1118 by gross, Tue Apr 24 08:55:04 2007 UTC
# Line 213  Data::getShapeTuple() const Line 213  Data::getShapeTuple() const
213          throw DataException("Error - illegal Data rank.");          throw DataException("Error - illegal Data rank.");
214    }    }
215  }  }
   
216  void  void
217  Data::copy(const Data& other)  Data::copy(const Data& other)
218  {  {
# Line 266  Data::copy(const Data& other) Line 265  Data::copy(const Data& other)
265    throw DataException("Error - Copy not implemented for this Data type.");    throw DataException("Error - Copy not implemented for this Data type.");
266  }  }
267    
268    
269    void
270    Data::setToZero()
271    {
272      {
273        DataExpanded* temp=dynamic_cast<DataExpanded*>(m_data.get());
274        if (temp!=0) {
275           temp->setToZero();
276           return;
277        }
278      }
279      {
280        DataTagged* temp=dynamic_cast<DataTagged*>(m_data.get());
281        if (temp!=0) {
282          temp->setToZero();
283          return;
284        }
285      }
286      {
287        DataConstant* temp=dynamic_cast<DataConstant*>(m_data.get());
288        if (temp!=0) {
289          temp->setToZero();
290          return;
291        }
292      }
293      throw DataException("Error - Data can not be set to zero.");
294    }
295    
296  void  void
297  Data::copyWithMask(const Data& other,  Data::copyWithMask(const Data& other,
298                     const Data& mask)                     const Data& mask)

Legend:
Removed from v.1117  
changed lines
  Added in v.1118

  ViewVC Help
Powered by ViewVC 1.1.26