Make Constraints a proper class
Converted the opaque C struct to a pimpl-ed C++ class.
Numerous callers of constraint routines now don't have to pass
parameters that are embedded within the class at setup time,
e.g. for logging, communication, per-atom information,
performance counters.
Some of those parameters have been converted to use const references
per style, which requires various callers and callees to be modified
accordingly. In particular, the mtop utility functions that take const
pointers have been deprecated, and some temporary wrapper functions
used so that we can defer the update of code completely unrelated to
constraints until another time. Similarly, t_commrec is retained as a
pointer, since it also makes sense to change globally.
Made ConstraintVariable an enum class. This generates some compiler
warnings to force us to cover potential bug cases with fatal errors.
Used more complete names for some of the enum members.
Introduced a factory function to continue the design that constr is
nullptr when we're not using constraints.
Added some const correctness where it now became necessary.
Refs #2423
Change-Id: I7a3833489b675f30863ca37c0359cd3e950b5494
26 files changed: