freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] MakeOwnCopy problem


From: Jeffrey Oldham
Subject: Re: [pooma-dev] MakeOwnCopy problem
Date: Mon, 11 Mar 2002 14:04:53 -0800
User-agent: Mutt/1.2.5.1i

        I agree.  Would you please check this change into the Pooma tree?

On Mon, Mar 11, 2002 at 10:59:47AM -0700, John Hall wrote:
> 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,
Jeffrey D. Oldham
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]