CSeq_annot_EditHandle CSeq_entry_EditHandle::AttachAnnot(CRef<CSeq_annot_Info> annot) const { typedef CAttachAnnot_EditCommand<CRef<CSeq_annot_Info> > TCommand; CCommandProcessor processor(x_GetScopeImpl()); return processor.run(new TCommand(*this, annot, x_GetScopeImpl())); }
void CBioseq_EditHandle::x_Detach(void) const { typedef CRemoveBioseq_EditCommand TCommand; CCommandProcessor processor(x_GetScopeImpl()); processor.run(new TCommand(*this, x_GetScopeImpl())); // x_GetScopeImpl().RemoveBioseq(*this); }
CSeq_annot_EditHandle CSeq_entry_EditHandle::AttachAnnot(const CSeq_annot_EditHandle& annot) const { typedef CAttachAnnot_EditCommand<CSeq_annot_EditHandle> TCommand; CCommandProcessor processor(x_GetScopeImpl()); return processor.run(new TCommand(*this, annot, x_GetScopeImpl())); //return x_GetScopeImpl().AttachAnnot(*this, annot); }
void CBioseq_EditHandle::SetInst_Hist(TInst_Hist& v) const { typedef CSet_SeqInstHist_EditCommand TCommand; CCommandProcessor processor(x_GetScopeImpl()); processor.run(new TCommand(*this, v)); // x_GetInfo().SetInst_Hist(v); }
bool CBioseq_EditHandle::RemoveId(const CSeq_id_Handle& id) const { typedef CRemoveId_EditCommand TCommand; CCommandProcessor processor(x_GetScopeImpl()); return processor.run(new TCommand(*this,id)); // return x_GetScopeInfo().RemoveId(id); }
void CBioseq_EditHandle::AddSeq_descr(TDescr& v) const { typedef CAddDescr_EditCommand<CBioseq_EditHandle> TCommand; CCommandProcessor processor(x_GetScopeImpl()); processor.run(new TCommand(*this, v)); // x_GetInfo().AddSeq_descr(v); }
CBioseq_EditHandle::TDescr& CBioseq_EditHandle::SetDescr(void) const { if (x_GetScopeImpl().IsTransactionActive() || GetTSE_Handle().x_GetTSE_Info().GetEditSaver() ) { NCBI_THROW(CObjMgrException, eTransaction, "TDescr& CBioseq_EditHandle::SetDescr(): " "method can not be called if a transaction is required"); } return x_GetInfo().SetDescr(); }
CSeq_annot_EditHandle CSeq_entry_EditHandle::TakeAnnot(const CSeq_annot_EditHandle& annot) const { CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction()); annot.Remove(); CSeq_annot_EditHandle handle = AttachAnnot(annot); tr->Commit(); return handle; // return x_GetScopeImpl().TakeAnnot(*this, annot); }
void CBioseq_EditHandle::Remove(CBioseq_EditHandle::ERemoveMode mode) const { if (mode == eKeepSeq_entry) x_Detach(); else { CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction()); CSeq_entry_EditHandle parent = GetParentEntry(); x_Detach(); parent.Remove(); tr->Commit(); } }
CBioseq_Handle CTSE_Handle::GetBioseqHandle(const CSeq_id_Handle& id) const { return x_GetScopeImpl().GetBioseqHandleFromTSE(id, *this); }
CRef<CSeqdesc> CBioseq_EditHandle::RemoveSeqdesc(const CSeqdesc& d) const { typedef CDesc_EditCommand<CBioseq_EditHandle,false> TCommand; CCommandProcessor processor(x_GetScopeImpl()); return processor.run(new TCommand(*this, d)); }
bool CBioseq_EditHandle::AddSeqdesc(CSeqdesc& d) const { typedef CDesc_EditCommand<CBioseq_EditHandle,true> TCommand; CCommandProcessor processor(x_GetScopeImpl()); return processor.run(new TCommand(*this, d)); }
void CBioseq_EditHandle::SetDescr(TDescr& v) const { typedef CSetValue_EditCommand<CBioseq_EditHandle,TDescr> TCommand; CCommandProcessor processor(x_GetScopeImpl()); processor.run(new TCommand(*this, v)); }
void CBioseq_EditHandle::ResetId(void) const { CCommandProcessor processor(x_GetScopeImpl()); processor.run(new CResetIds_EditCommand(*this)); }
CBioseq_EditHandle CSeq_entry_EditHandle::SetSeq(void) const { return x_GetScopeImpl().GetBioseqHandle(x_GetInfo().SetSeq(), GetTSE_Handle()).GetEditHandle(); }
CBioseq_EditHandle CBioseq_Handle::GetEditHandle(void) const { return x_GetScopeImpl().GetEditHandle(*this); }
void CSeq_entry_EditHandle::AddDescr(TDescr& v) const { typedef CAddDescr_EditCommand<CSeq_entry_EditHandle> TCommand; CCommandProcessor processor(x_GetScopeImpl()); processor.run(new TCommand(*this, v)); }
void CSeq_entry_EditHandle::ResetDescr(void) const { typedef CResetValue_EditCommand<CSeq_entry_EditHandle,TDescr> TCommand; CCommandProcessor processor(x_GetScopeImpl()); processor.run(new TCommand(*this)); }