MakeOwnCopy problem
John Hall
jhh at caverns.com
Mon Mar 11 17:59:47 UTC 2002
Gang:
In FieldEngine.h, the routine makeOwnCopy references a "model" which
doesn't exist. I changed it locally to s.fieldEngine().data(m,c)
which compiles and links and seems to make sense to me.
Could someone else take a look at it and tell me what the right thing to do is?
//---------------------------------------------------------------------------
// Make a distinct copy of this fieldEngineBase.
template<class Subject>
void makeOwnCopy(const Subject &s)
{
PAssert(data_m.isValid());
// Create a blank slate of engines:
data_m = RefCountedBlockPtr<Data_t>();
stride_m = centering_m.size();
addSubFields();
// Copy then engines and relations and
// Deepen the copies of the engine & relations list.
for (int m = 0; m < num_materials_m; ++m)
{
for (int c = 0; c < centering_m.size(); ++ c)
{
data(m, c) = model.data(m, c); // This is THE LINE in question
data(m, c).engine().makeOwnCopy();
data(m, c).relations().makeOwnCopy(s);
}
}
}
Thanks,
John Hall
--
More information about the pooma-dev
mailing list