void CEditsSaver::RemoveId(const CBioseq_Handle& handle, const CSeq_id_Handle& id, ECallMode mode) { CRef<CSeqEdit_Cmd> cmd; SCmdCreator<CSeqEdit_Cmd::e_Remove_id>::CreateCmd(handle, CBioObjectId(id), cmd). SetRemove_id(const_cast<CSeq_id&>(*id.GetSeqId())); GetDBEngine().SaveCommand(*cmd); GetDBEngine().NotifyIdChanged(id,""); }
void CEditsSaver::ResetIds(const CBioseq_Handle& handle, const TIds& ids, ECallMode mode) { if (ids.empty()) return; typedef CSeqEdit_Cmd_ResetIds::TRemove_ids TList; CRef<CSeqEdit_Cmd> cmd; TList& id_list = SCmdCreator<CSeqEdit_Cmd::e_Reset_ids>::CreateCmd(handle, CBioObjectId(*ids.begin()), cmd) .SetRemove_ids(); transform(ids.begin(), ids.end(), back_inserter(id_list), s_ConvertId); GetDBEngine().SaveCommand(*cmd); ITERATE(TIds, id, ids) { GetDBEngine().NotifyIdChanged(*id,""); ; }
void CTSE_Info_Object::x_TSEAttachContents(CTSE_Info& tse) { _ASSERT(!m_TSE_Info); m_TSE_Info = &tse; SetBioObjectId(CBioObjectId()); }