Ejemplo n.º 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()));
}
Ejemplo n.º 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);
}
Ejemplo n.º 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);
}
Ejemplo n.º 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);
}
Ejemplo n.º 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);
}
Ejemplo n.º 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);
}
Ejemplo n.º 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();
}
Ejemplo n.º 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);
}
Ejemplo n.º 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();
    }
}
Ejemplo n.º 10
0
CBioseq_Handle CTSE_Handle::GetBioseqHandle(const CSeq_id_Handle& id) const
{
    return x_GetScopeImpl().GetBioseqHandleFromTSE(id, *this);
}
Ejemplo n.º 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));
}
Ejemplo n.º 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));
}
Ejemplo n.º 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));
}
Ejemplo n.º 14
0
void CBioseq_EditHandle::ResetId(void) const
{
    CCommandProcessor processor(x_GetScopeImpl());
    processor.run(new CResetIds_EditCommand(*this));
}
Ejemplo n.º 15
0
CBioseq_EditHandle CSeq_entry_EditHandle::SetSeq(void) const
{
    return x_GetScopeImpl().GetBioseqHandle(x_GetInfo().SetSeq(),
                                            GetTSE_Handle()).GetEditHandle();

}
Ejemplo n.º 16
0
CBioseq_EditHandle CBioseq_Handle::GetEditHandle(void) const
{
    return x_GetScopeImpl().GetEditHandle(*this);
}
Ejemplo n.º 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));
}
Ejemplo n.º 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));
}