On Mon, Aug 20, 2012 at 2:03 PM, Roy Stogner <royst...@ices.utexas.edu> wrote: > >> 2.) We add a virtual clone() method to PeriodicBoundary. Both >> versions of DofMap::add_periodic_boundary() take constant references >> and clone() them internally before adding them to the >> _periodic_boundaries container. > > > This is what we're doing in most similar situations; I'd prefer it for > consistency. > >> 3.) Make all the add_periodic_boundary() interfaces take >> AutoPtr<PeriodicBoundary>&, user is responsible for creating those and >> knowing that ownership is transferred when calling this function. > > > This is okay. > >> #2 requires more library changes. If we did this, we might as well go >> the full 9 yards and make PeriodicBoundary an abstract base with a >> virtual clone(), forcing derived classes to implement it. The >> PeriodicBoundary implementing translation (what's currently in the >> library) would be a derived class of PeriodicBoundaryBase. > > > Yeah, we'd definitely want to call the ABC PeriodicBoundaryBase so we > could still instantiate PeriodicBoundary for backwards compatibility.
OK, and I assume we'd like to maintain the "automatically invertible" feature which is currently available at the base class level? I think this is possible, it just means the clone() function needs to take an optional argument like the copy constructor. -- John ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel