On Thu, Sep 15, 2022 at 06:01:39PM +0800, Kent Gibson wrote: > On Thu, Sep 15, 2022 at 10:47:23AM +0200, Bartosz Golaszewski wrote: > > In order to make the interface more elegant use the Rust-like builder > > pattern for the GPIO simulator class. > > > > Signed-off-by: Bartosz Golaszewski <brgl@xxxxxxxx> > > --- > > > - ::gpiosim::chip sim({{ property::NUM_LINES, 8 }, { property::LABEL, "foobar" }}); > > + auto sim = make_sim() > > + .set_num_lines(8) > > + .set_label("foobar") > > + .build(); > > + > > You do this a few times, so perhaps add a helper to create a simple > simulator with a given a number of lines? > > (I called the equivalent in my tests a Simpleton, borrowing LinusW's > practice of naming things after yourself. > Not that I'm suggesting you use that name.) Good grief - I meant LinusT. See what I mean? Cheers, Kent.