    }
  }
  
  void DBCManager::removeSignal(const MessageId &id, const QString &sig_name) {
    if (auto m = const_cast<Msg *>(msg(id))) {
      auto it = std::find_if(m->sigs.begin(), m->sigs.end(), [&](auto &s) { return s.name == sig_name; });
      if (it != m->sigs.end()) {
        emit signalRemoved(&(*it));
        m->sigs.erase(it);
      }
 
</s> remove void DBCManager::updateSignal(const MessageId &id, const QString &sig_name, const Signal &sig) {
  if (auto m = const_cast<Msg *>(msg(id))) {
    if (auto s = (Signal *)m->sig(sig_name)) {
 </s> add void DBCManager::updateSignal(const MessageId &id, const QString &sig_name, const cabana::Signal &sig) {
  if (auto m = const_cast<cabana::Msg *>(msg(id))) {
    if (auto s = (cabana::Signal *)m->sig(sig_name)) { </s> remove void DBCManager::addSignal(const MessageId &id, const Signal &sig) {
  if (auto m = const_cast<Msg *>(msg(id.address))) {
 </s> add void DBCManager::addSignal(const MessageId &id, const cabana::Signal &sig) {
  if (auto m = const_cast<cabana::Msg *>(msg(id.address))) { </s> remove struct MessageId {
  uint8_t source;
  uint32_t address;

  QString toString() const {
    return QString("%1:%2").arg(source).arg(address, 1, 16);
  }

  bool operator==(const MessageId &other) const {
    return source == other.source && address == other.address;
  }

  bool operator!=(const MessageId &other) const {
    return !(*this == other);
  }

  bool operator<(const MessageId &other) const {
    return std::pair{source, address} < std::pair{other.source, other.address};
  }

  bool operator>(const MessageId &other) const {
    return std::pair{source, address} > std::pair{other.source, other.address};
  }
};

uint qHash(const MessageId &item);
Q_DECLARE_METATYPE(MessageId);

namespace dbcmanager {

typedef QList<std::pair<QString, QString>> ValueDescription;

struct Signal {
  QString name;
  int start_bit, msb, lsb, size;
  bool is_signed;
  double factor, offset;
  bool is_little_endian;
  QString min, max, unit;
  QString comment;
  ValueDescription val_desc;
};

struct Msg {
  QString name;
  uint32_t size;

  std::vector<const Signal*> getSignals() const;
  const Signal *sig(const QString &sig_name) const {
    auto it = std::find_if(sigs.begin(), sigs.end(), [&](auto &s) { return s.name == sig_name; });
    return it != sigs.end() ? &(*it) : nullptr;
  }

private:
  QList<Signal> sigs;
  friend class DBCManager;
};
 </s> add #include "tools/cabana/dbc.h" </s> remove   for (auto it = sigs.begin(); it != sigs.end(); /**/) {
 </s> add void ChartView::signalUpdated(const cabana::Signal *sig) { </s> remove bool SignalModel::saveSignal(const Signal *origin_s, Signal &s) {
 </s> add bool SignalModel::saveSignal(const cabana::Signal *origin_s, cabana::Signal &s) {
  if (auto m = const_cast<cabana::Msg *>(msg(id))) {
    }
  }
  
  void DBCManager::removeSignal(const MessageId &id, const QString &sig_name) {
  if (auto m = const_cast<cabana::Msg *>(msg(id))) {
      auto it = std::find_if(m->sigs.begin(), m->sigs.end(), [&](auto &s) { return s.name == sig_name; });
      if (it != m->sigs.end()) {
        emit signalRemoved(&(*it));
        m->sigs.erase(it);
      }
keep keep keep keep replace keep keep keep keep keep
 cabana: refactor Msg and Signal into dbc.cc (#27552) 
tools/cabana/dbcmanager.cc