예제 #1
0
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()));
}
예제 #2
0
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);
}
예제 #3
0
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);
}
예제 #4
0
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);
}
예제 #5
0
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);
}
예제 #6
0
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);
}
예제 #7
0
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();
}
예제 #8
0
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);
}
예제 #9
0
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();
    }
}
예제 #10
0
CBioseq_Handle CTSE_Handle::GetBioseqHandle(const CSeq_id_Handle& id) const
{
    return x_GetScopeImpl().GetBioseqHandleFromTSE(id, *this);
}
예제 #11
0
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));
}
예제 #12
0
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));
}
예제 #13
0
void CBioseq_EditHandle::SetDescr(TDescr& v) const
{
    typedef CSetValue_EditCommand<CBioseq_EditHandle,TDescr> TCommand;
    CCommandProcessor processor(x_GetScopeImpl());
    processor.run(new TCommand(*this, v));
}
예제 #14
0
void CBioseq_EditHandle::ResetId(void) const
{
    CCommandProcessor processor(x_GetScopeImpl());
    processor.run(new CResetIds_EditCommand(*this));
}
예제 #15
0
CBioseq_EditHandle CSeq_entry_EditHandle::SetSeq(void) const
{
    return x_GetScopeImpl().GetBioseqHandle(x_GetInfo().SetSeq(),
                                            GetTSE_Handle()).GetEditHandle();

}
예제 #16
0
CBioseq_EditHandle CBioseq_Handle::GetEditHandle(void) const
{
    return x_GetScopeImpl().GetEditHandle(*this);
}
예제 #17
0
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));
}
예제 #18
0
void CSeq_entry_EditHandle::ResetDescr(void) const
{
    typedef CResetValue_EditCommand<CSeq_entry_EditHandle,TDescr> TCommand;
    CCommandProcessor processor(x_GetScopeImpl());
    processor.run(new TCommand(*this));
}