#521 Nonstatic layout member in mcmgmappers
Metadata
Property | Value |
---|---|
Reported by | Carsten Gräser (graeser@math.fu-berlin.de) |
Reported at | Mar 18, 2009 14:34 |
Type | Feature Request |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
Last edited at | Mar 19, 2009 13:48 |
Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
Closed at | Mar 19, 2009 13:48 |
Closed in version | Unknown |
Resolution | Implemented |
Comment | I committed the patch in revisions 4937 and 4938. Please reopen if there are problems with this. |
Description
Currently the MCMGMapper gets the Layout class template as template parameter and uses a static instance of this class to determine if a GeometryType should be counted by the mapper. This is done using a nonstatic method of this instance
The attached patch changes the behaviour such that a nonstatic layout member is used. It also adds constructors to the mappers allowing to provide a custom layout object.
While this does not brake existing code (except for the ugly case it relies on the use of single static member) it provides the possibility to use mappers for different codims having the same type. Thus one could use an array containing a mapper for each codim.
To be compatible with the current interface description the member is mutable. In the long term the contains method of layout classes should be const allowing the member to be const to.