[pooma-dev] Domain traits

Julian Cummings cummings at cacr.caltech.edu
Wed Apr 11 21:25:10 UTC 2001


James Crotinger wrote:

> I guess that's one of the main things I hate about DomainTraits - why all the
> duplication? To me, the right way to have done this would have been for the
> default traits template to get all of its traits from the actual class (not
> the other way around, as it is now, which creates some very strange circular
> and cross dependencies), and then there would only be specializations for not
> Pooma/src/Domain classes, things like int.

The trouble is that when you "get the traits" from somewhere else,
you are in fact duplicating them.  If you write something like


template <class Dom>

struct DomainTraits {

  static const int dimensions = Dom::dimensions;

  // ...

};

then you are once again duplicating all the traits data.
Given that we cannot easily make DomainTraits go away
without a major redesign, I chose to sweep all the Domain
class traits into one place: DomainTraits.  At least that
way, the duplication issue is solved and there is one standard
way to access the traits.

> Anyway, my 2 cents is to leave the traits in the class.
>         Jim

OK, but can I commit these changes anyway??  ;-)
Seriously, I'd like to finish this and move on to other
stuff.  Unless there are technical reasons why this
would prevent new Pooma code development, break
existing code, cause a painful burning sensation, etc.,
I'd like to check in my changes later today.

Thanks, Julian C.


--
Dr. Julian C. Cummings                       E-mail: cummings at cacr.caltech.edu
California Institute of Technology           Phone:  626-395-2543
1200 E. California Blvd., Mail Code 158-79   Fax:    626-584-5917
Pasadena, CA 91125






More information about the pooma-dev mailing list