Use a single member function for linking

Combine all four linking-related member functions into a single member function
with an enum to identify the current operation. Relates #180.