freepooma-devel
[Top][All Lists]
Advanced

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

Re: [pooma-dev] Is Default Constructable really required?


From: Jeffrey Oldham
Subject: Re: [pooma-dev] Is Default Constructable really required?
Date: Fri, 8 Mar 2002 09:44:07 -0800
User-agent: Mutt/1.2.5.1i

Scott is probably the best person to take a first whack at answering
this.

On Thu, Mar 07, 2002 at 05:36:37PM -0700, John H. Hall wrote:
> Gang:
> In the notes on Relations (in relations.h, copied below) it states "The 
> RelationFunctor must be Default Constructable...", yet from the use of 
> it, I don't see any actual requirement for this. It seems we just pass 
> around const references and use the alternate required constructor 
> mentioned below, along with a copy constructor. I need to set up some 
> state in my RelationFunctors and I would prefer to do it during 
> construction, along with providing the correct copy constructors and a 
> version of this required constructor which is essentially a copy 
> constructor++.
> 
> So I guess my question boils down to: "How do I set and keep state in 
> RelationFunctors?" Any non-trivial use of Relations will require this.
> 
> Thanks,
> John Hall
> 
> 
> // 
> ----------------------------------------------------------------------------
> // Relation0 is a template used to construct relations, such as boundary
> // conditions, that do not depend on additional fields. The Target must 
> be
> // a Field. The RelationFunctor must be Default Constructable and 
> Assignable.
> // In addition, it must provide the constructor
> //
> //   template<class L>
> //   RelationFunctor(const L &, const RelationFunctor &)
> //
> // and the member function
> //
> //   template<class L>
> //   void operator()(const L &) const
> //
> // where L is a Field. The constructor should use the arguments to
> // initialize itself and the function should apply the relation.
> // 
> ----------------------------------------------------------------------------

Thanks,
Jeffrey D. Oldham
address@hidden

reply via email to

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