[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MakeOwnCopy problem
From: |
John Hall |
Subject: |
MakeOwnCopy problem |
Date: |
Mon, 11 Mar 2002 10:59:47 -0700 |
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
--
- MakeOwnCopy problem,
John Hall <=