The operator<<() is actually not a member function of Line. Can one write implementation of a friend function here?