While designing an interface for a class I normally get caught in two minds whether should I provide member functions which can be calculated / derived by using combinations of
The STL has basically aimed for small interfaces, so in your case, if and only if getSelectedDocs
can be implemented more efficiently than a combination of isDocSelected
and getDoc
it would be implemented as a member function.
This technique may not be applicable anywhere but it's a good rule of thumbs to prevent clutter in interfaces.