Hi,

I thought I should express before I go what is really required in order to implement properly advanced Find&replace and document comparison:

We need "Inset::operator==(Inset const &)".

Two options here:

1) this is a pure virtual method:

bool Inset::operator==(Inset const &) const = 0;

2) Or we rely on inheriting classes for the implementation:

bool Inset::operator==(Inset const & i) const
{
    return lyxCode() == i.lyxCode();
}


bool InsetText::operator==(InsetText const & i) const
{
    if (!Inset::operator==(i))
        return false;
    return text_ == i.text_;
}

etc, etc.

I am in favor of the second option personnally...

Abdel.




Reply via email to