This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use visitors for make_gdb_type


On Mon, Jan 29, 2018 at 4:12 PM, Simon Marchi <simon.marchi@ericsson.com> wrote:
>
> That seems like unnecessary boilerplate to me.  I really don't see why classes derived
> from tdesc_element_visitor have to implement methods for nodes they don't care about.
>
> I added Yao in CC so he can chime in.

When I wrote tdesc_element_visitor, in my mind, it is an interface, so
I expect child
class implement all the methods, because at that moment, all methods are needed,
no empty methods.  However, the situation changed a little bit, as per
Alan's needs,
part of the methods of tdesc_element_visitor are needed, and the rest of methods
are empty somewhere.  I don't mind converting tdesc_element_visitor into a base
class which has all these methods empty as a default.  That is fine to
me.  By the
way, Alan's approach is fine to me as well :)

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]