Andre Poenitz wrote: > What's the benefit of > > virtual string const & name() const { return name_; } > /// > static string const name_; > ... > string const InsetTabularMailer:: name_("tabular"); > > over > > virtual string const & name() const { return "tabular"; }
Ahhhh. I remember now. The bulk of the work is actually done in the _static_ methods params2string and string2params. If I did as you suggest, then I'd have to create a temporary MailInset just to extract the name. Or hard code it of course. Do you have any preferences over leaving this name stuff as-is or having string literals in 3 places? InsetTabularMailer::params2string(InsetTabular const & inset) { BufferView * const bv = inset.view(); Buffer const * const buffer = bv ? bv->buffer() : 0; if (!buffer) return string(); ostringstream data; data << name_ << " active_cell " << inset.getActCell() << '\n'; inset.write(buffer, data); data << "\\end_inset\n"; return data.str(); } -- Angus