59 : m_Info(tse.x_GetScopeInfo().GetScopeLock(tse, tse.x_GetTSE_Info()))
66 : m_Info(tse.x_GetScopeInfo().GetScopeLock(tse,
info))
121 if (
info.HasParent_Info() ) {
175 "CSeq_entry_Handle::GetSingleSubEntry: "
176 "Seq-entry is not Bioseq-set");
181 "CSeq_entry_Handle::GetSingleSubEntry: "
182 "Seq-entry is empty");
187 "CSeq_entry_Handle::GetSingleSubEntry: "
188 "Seq-entry contains more than one sub entry");
204 if (
info.HasParent_Info() ) {
259 "object is not in editing mode");
287 if (
info.HasParent_Info() ) {
305 if (
info.HasParent_Info() ) {
339 processor.
run(
new TCommand(*
this, v));
348 "TDescr& CSeq_entry_EditHandle::SetDescr(): "
349 "method can not be called if a transaction is required");
359 processor.
run(
new TCommand(*
this, v));
367 processor.
run(
new TCommand(*
this));
375 return processor.
run(
new TCommand(*
this, v));
383 return processor.
run(
new TCommand(*
this, v));
496 vector<CSeq_annot_EditHandle> annots;
499 annots.push_back(it->GetEditHandle());
501 ITERATE ( vector<CSeq_annot_EditHandle>, it, annots ) {
599 return processor.run(
new TCommand(*
this, seqset,
x_GetScopeImpl()));
655 "CSeq_entry_EditHandle::ConvertSeqToSet: "
656 "Seq-entry is not in 'seq' state");
677 "CSeq_entry_EditHandle::CollapseSet: "
678 "sub entry should be non-empty");
683 if ( entry.
IsSet() ) {
708 if ( !entry.
IsSeq() ) {
710 "CSeq_entry_EditHandle::ConvertSetToSeq: "
711 "sub entry should contain Bioseq");
CBioseq_set_EditHandle –.
CMDReturn< CMD >::TReturn run(CMD *cmd)
Base class for all object manager exceptions.
CBioseq_Handle GetBioseqHandle(const CSeq_id_Handle &id, int get_flag)
@Seq_descr.hpp User-defined methods of the data storage class.
CConstRef< TObject > GetSeq_entryCore(void) const
CRef< CSeqdesc > RemoveSeqdesc(const CSeqdesc &d)
bool AddSeqdesc(CSeqdesc &d)
void AddSeq_descr(const TDescr &v)
CRef< CSeqdesc > ReplaceSeqdesc(const CSeqdesc &old_desc, CSeqdesc &new_desc)
const TDescr & GetDescr(void) const
E_Choice Which(void) const
bool IsSetDescr(void) const
virtual const CBioObjectId & GetBioObjectId(void) const
CConstRef< TObject > GetCompleteSeq_entry(void) const
CBioseq_Handle GetBioseqHandle(const CSeq_id &id) const
Get Bioseq handle from this TSE.
CSubmit_block & SetTopLevelSubmit_block() const
const CSubmit_block & GetTopLevelSubmit_block() const
More efficient direct access to Seq-submit.sub field.
bool IsTopLevelSeq_submit() const
const CSeq_submit & GetTopLevelSeq_submit() const
Return reference to top-level Seq-submit object Throw an exception if it's not available.
bool CanBeEdited(void) const
Return true if this TSE handle is local to scope and can be edited.
const CTSE_Info & GetTSE_Info(void) const
bool HasParent_Info(void) const
TBlobVersion GetBlobVersion(void) const
const TBlobId & GetBlobId(void) const
IEditSaver * GetEditSaver(const Handle &handle)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
CBioseq_EditHandle GetEditHandle(const CBioseq_Handle &seq)
Get editable Biosec handle by regular one.
CSubmit_block & SetTopLevelSubmit_block(void) const
Seq-submit support.
TSeq ConvertSetToSeq(void) const
Do the same as CollapseSet() when sub-entry is of type bioseq.
const TDescr & GetDescr(void) const
CRef< CSeqdesc > RemoveSeqdesc(const CSeqdesc &v) const
void x_RealResetDescr(void) const
CSeq_annot_EditHandle TakeAnnot(const CSeq_annot_EditHandle &annot) const
Remove the annotation from its location and attach to current one.
friend class CBioseq_set_Handle
TSet SelectSet(TClass set_class=CBioseq_set::eClass_not_set) const
Convert the empty Seq-entry to Bioseq-set.
TSet TakeSet(const TSet &seqset) const
Make the empty Seq-entry be in set state with moving Bioseq-set object from the argument seqset.
void Swap(CSeq_entry_Handle &h)
Reset handle and make it not to point to any seq-entry.
CBioseq_set_EditHandle GetParentBioseq_set(void) const
Get parent bioseq-set edit handle.
const CSeq_submit & GetTopLevelSeq_submit(void) const
void UpdateAnnotations(void) const
Update annotation index after manual modification of the object.
void SelectNone(void) const
Make this Seq-entry to be empty.
const TObjectInfo & GetObjectInfo(void) const
void Remove(void) const
Remove current annot.
void SetClass(TClass v) const
CBioseq_EditHandle AttachBioseq(CBioseq &seq, int index=-1) const
Attach a bioseq.
TSet CopySet(const CBioseq_set_Handle &seqset) const
Make the empty Seq-entry be in set state with given Bioseq-set object.
void AddDescr(TDescr &v) const
CSeq_entry_EditHandle GetSingleSubEntry(void) const
Get edit handle of the sub seq-entry If current seq-entry is not seq-set or has more than one subentr...
E_Choice Which(void) const
const CBioObjectId & GetBioObjectId(void) const
Get unique object id.
void x_RealSetDescr(TDescr &v) const
CSeq_entry_EditHandle TakeEntry(const CSeq_entry_EditHandle &entry, int index=-1) const
Remove seq-entry from its location and attach to current one.
void Remove(void) const
Remove this Seq-entry from parent, or scope if it's top level Seq-entry.
bool IsRemoved(void) const
CSeq_annot_EditHandle AttachAnnot(CSeq_annot &annot) const
Attach an annotation.
TSet ConvertSeqToSet(TClass set_class=CBioseq_set::eClass_not_set) const
Convert the entry from Bioseq to Bioseq-set.
void TakeAllAnnots(const CSeq_entry_EditHandle &src_entry) const
Remove all the annotation from seq-entry and attach to current one.
const CTSE_Handle & GetTSE_Handle(void) const
const CSubmit_block & GetTopLevelSubmit_block(void) const
void Remove(ERemoveMode mode=eRemoveSeq_entry) const
void Remove(ERemoveMode mode=eRemoveSeq_entry) const
Remove current seqset-entry from its location.
CBioseq_set_Handle GetParentBioseq_set(void) const
Get parent bioseq-set handle.
const CSeq_entry_Info & x_GetInfo(void) const
TSeq SelectSeq(CBioseq &seq) const
Make the empty Seq-entry be in seq state with specified Bioseq object.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id) const
Get Bioseq handle from the TSE of this Seq-entry.
bool IsRemoved(void) const
Check if handle points to a removed bioseq.
friend class CBioseq_EditHandle
bool IsTopLevelEntry(void) const
Check if this handle is top-level entry.
CBioseq_EditHandle TakeBioseq(const CBioseq_EditHandle &seq, int index=-1) const
Remove bioseq from its location and attach to current one.
CSeq_entry_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CBioseq_EditHandle CopyBioseq(const CBioseq_Handle &seq, int index=-1) const
Attach a copy of the bioseq.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
void x_RealAddSeq_descr(TDescr &v) const
bool IsTopLevelSeq_submit(void) const
Seq-submit access functions.
CBioseq_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CBioseq_EditHandle CopyBioseq(const CBioseq_Handle &seq, int index=-1) const
Attach a copy of the existing bioseq.
bool x_RealAddSeqdesc(CSeqdesc &v) const
CSeq_entry_EditHandle AttachEntry(CSeq_entry &entry, int index=-1) const
Attach an existing seq-entry.
TSeq CopySeq(const CBioseq_Handle &seq) const
Make the empty Seq-entry be in seq state with specified Bioseq object.
const CBioseq_set_Info & x_GetInfo(void) const
bool IsSetDescr(void) const
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
TBlobId GetBlobId(void) const
CSeq_entry_EditHandle CopyEntry(const CSeq_entry_Handle &entry, int index=-1) const
Attach a copy of the existing seq-entry.
CScope & GetScope(void) const
Get scope this handle belongs to.
const CSeq_annot_Info & x_GetInfo(void) const
CSeq_entry_EditHandle TakeEntry(const CSeq_entry_EditHandle &entry, int index=-1) const
Remove seq-entry from its location and attach to current one.
CBioseq_EditHandle TakeBioseq(const CBioseq_EditHandle &seq, int index=-1) const
Remove bioseq from its location and attach to current one.
TBlobVersion GetBlobVersion(void) const
TDescr & SetDescr(void) const
void CollapseSet(void) const
Collapse one level of Bioseq-set.
const CBioseq_Info & x_GetInfo(void) const
CRef< CSeqdesc > x_RealRemoveSeqdesc(const CSeqdesc &v) const
CSeq_entry_EditHandle AddNewEntry(int index) const
Create new empty seq-entry.
CSeq_entry_EditHandle AttachEntry(CSeq_entry &entry, int index=-1) const
Attach an existing seq-entry.
CRef< CSeqdesc > x_RealReplaceSeqdesc(const CSeqdesc &old_desc, CSeqdesc &new_desc) const
CSeq_entry_EditHandle GetParentEntry(void) const
Get parent seq-entry edit handle.
void TakeAllDescr(const CSeq_entry_EditHandle &src_entry) const
Remove all the descritions from seq-entry and attach to current one.
CBioseq_EditHandle AttachBioseq(CBioseq &seq, int index=-1) const
Attach an existing bioseq.
CSeq_entry_EditHandle CopyEntry(const CSeq_entry_Handle &entry, int index=-1) const
Attach a copy of the existing seq-entry.
bool HasParentEntry(void) const
Check if current seq-entry has a parent.
void ResetDescr(void) const
CSeq_entry_Info & x_GetInfo(void) const
CSeq_entry_EditHandle(void)
void Reset(void)
Reset handle and make it not to point to any seq-entry.
CSeq_entry_Handle GetSingleSubEntry(void) const
Get handle of the sub seq-entry If current seq-entry is not seq-set or has more than one subentry exc...
CSeq_annot_EditHandle CopyAnnot(const CSeq_annot_Handle &annot) const
Attach a copy of the annotation.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
bool AddSeqdesc(CSeqdesc &v) const
TSeq TakeSeq(const TSeq &seq) const
Make the empty Seq-entry be in seq state with moving bioseq object from the argument seq.
CScope_Impl & x_GetScopeImpl(void) const
friend class CBioseq_set_EditHandle
CConstRef< CSeq_entry > GetSeq_entryCore(void) const
Get const reference to the seq-entry.
CRef< CSeqdesc > ReplaceSeqdesc(const CSeqdesc &old_desc, CSeqdesc &new_desc) const
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Swap(TThisType &ref)
Swaps the pointer with another reference.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
@ e_not_set
No variant selected.