NCBI C++ ToolKit
seq_entry_handle.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: seq_entry_handle.cpp 87148 2019-07-30 16:13:15Z vasilche $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Author: Aleksey Grichenko, Eugene Vasilchenko
27 *
28 * File Description:
29 * Handle to Seq-entry object
30 *
31 */
32 
33 #include <ncbi_pch.hpp>
35 #include <objmgr/seq_entry_ci.hpp>
36 #include <objmgr/seq_annot_ci.hpp>
37 #include <objmgr/bioseq_handle.hpp>
39 #include <objmgr/scope.hpp>
40 #include <objmgr/bio_object_id.hpp>
41 
44 #include <objmgr/impl/tse_info.hpp>
49 
51 #include <objects/seq/Seqdesc.hpp>
52 
53 
56 
57 
59  : m_Info(tse.x_GetScopeInfo().GetScopeLock(tse, tse.x_GetTSE_Info()))
60 {
61 }
62 
63 
65  const CTSE_Handle& tse)
66  : m_Info(tse.x_GetScopeInfo().GetScopeLock(tse, info))
67 {
68 }
69 
70 
72 {
73  m_Info.Swap(h.m_Info);
74 }
75 
76 
78 {
79  m_Info.Reset();
80 }
81 
83 {
84  return x_GetInfo().GetBioObjectId();
85 }
86 
88 {
89  return m_Info->GetObjectInfo();
90 }
91 
92 
94 {
95  return x_GetInfo().Which();
96 }
97 
98 
100 {
101  return x_GetInfo().GetCompleteSeq_entry();
102 }
103 
104 
106 {
107  return x_GetInfo().GetSeq_entryCore();
108 }
109 
110 
112 {
113  return *this && x_GetInfo().HasParent_Info();
114 }
115 
116 
118 {
119  CSeq_entry_Handle ret;
120  const CSeq_entry_Info& info = x_GetInfo();
121  if ( info.HasParent_Info() ) {
122  ret = CSeq_entry_Handle(info.GetParentSeq_entry_Info(),
123  GetTSE_Handle());
124  }
125  return ret;
126 }
127 
128 
130 {
131  return !x_GetInfo().HasParent_Info();
132 }
133 
134 
136 {
137  return GetTSE_Handle();
138 }
139 
140 
142 {
144 }
145 
146 
148 {
150 }
151 
152 
154 {
156 }
157 
158 
160 {
161  return GetTSE_Handle().GetBioseqHandle(id);
162 }
163 
164 
166 {
167  return GetTSE_Handle().GetBioseqHandle(id);
168 }
169 
170 
172 {
173  if ( !IsSet() ) {
174  NCBI_THROW(CObjMgrException, eModifyDataError,
175  "CSeq_entry_Handle::GetSingleSubEntry: "
176  "Seq-entry is not Bioseq-set");
177  }
178  CSeq_entry_CI iter(*this);
179  if ( !iter ) {
180  NCBI_THROW(CObjMgrException, eModifyDataError,
181  "CSeq_entry_Handle::GetSingleSubEntry: "
182  "Seq-entry is empty");
183  }
184  CSeq_entry_Handle entry = *iter;
185  if ( ++iter ) {
186  NCBI_THROW(CObjMgrException, eModifyDataError,
187  "CSeq_entry_Handle::GetSingleSubEntry: "
188  "Seq-entry contains more than one sub entry");
189  }
190  return entry;
191 }
192 
193 
195 {
196  return GetScope().GetEditHandle(*this);
197 }
198 
199 
201 {
202  CBioseq_set_Handle ret;
203  const CSeq_entry_Info& info = x_GetInfo();
204  if ( info.HasParent_Info() ) {
205  ret = CBioseq_set_Handle(info.GetParentBioseq_set_Info(),
206  GetTSE_Handle());
207  }
208  return ret;
209 }
210 
211 
213 {
215  GetTSE_Handle());
216 }
217 
218 
220 {
222  GetTSE_Handle());
223 }
224 
225 
227 {
228  return x_GetInfo().IsSetDescr();
229 }
230 
231 
233 {
234  return x_GetInfo().GetDescr();
235 }
236 
237 
239 {
240  return x_GetInfo().GetTSE_Info().GetBlobId();
241 }
242 
243 
245 {
246  return x_GetInfo().GetTSE_Info().GetBlobVersion();
247 }
248 
249 
250 /////////////////////////////////////////////////////////////////////////////
251 // CSeq_entry_EditHandle
252 
253 
255  : CSeq_entry_Handle(h)
256 {
257  if ( !h.GetTSE_Handle().CanBeEdited() ) {
258  NCBI_THROW(CObjMgrException, eInvalidHandle,
259  "object is not in editing mode");
260  }
261 }
262 
263 
265  const CTSE_Handle& tse)
266  : CSeq_entry_Handle(info, tse)
267 {
268 }
269 
270 
272 {
274 }
275 
276 
278 {
280 }
281 
282 
284 {
287  if ( info.HasParent_Info() ) {
288  ret = CSeq_entry_EditHandle(info.GetParentSeq_entry_Info(),
289  GetTSE_Handle());
290  }
291  return ret;
292 }
293 
294 
296 {
298 }
299 
300 
302 {
305  if ( info.HasParent_Info() ) {
306  ret = CBioseq_set_EditHandle(info.GetParentBioseq_set_Info(),
307  GetTSE_Handle());
308  }
309  return ret;
310 }
311 
312 
314 {
315  return const_cast<CSeq_entry_Info&>(CSeq_entry_Handle::x_GetInfo());
316 }
317 
318 
320 {
322  GetTSE_Handle());
323 
324 }
325 
326 
328 {
331 
332 }
333 
334 
336 {
338  CCommandProcessor processor(x_GetScopeImpl());
339  processor.run(new TCommand(*this, v));
340 }
341 
342 
344 {
345  if (x_GetScopeImpl().IsTransactionActive()
346  || GetTSE_Handle().x_GetTSE_Info().GetEditSaver() ) {
347  NCBI_THROW(CObjMgrException, eTransaction,
348  "TDescr& CSeq_entry_EditHandle::SetDescr(): "
349  "method can not be called if a transaction is required");
350  }
351  return x_GetInfo().SetDescr();
352 }
353 
354 
356 {
358  CCommandProcessor processor(x_GetScopeImpl());
359  processor.run(new TCommand(*this, v));
360 }
361 
362 
364 {
366  CCommandProcessor processor(x_GetScopeImpl());
367  processor.run(new TCommand(*this));
368 }
369 
370 
372 {
374  CCommandProcessor processor(x_GetScopeImpl());
375  return processor.run(new TCommand(*this, v));
376 }
377 
378 
380 {
382  CCommandProcessor processor(x_GetScopeImpl());
383  return processor.run(new TCommand(*this, v));
384 }
385 
386 
388 {
389  return x_RealReplaceSeqdesc(old_desc, new_desc);
390 }
391 
392 
395 {
396  return SetSet().AttachBioseq(seq, index);
397 }
398 
399 
402  int index) const
403 {
404  return SetSet().CopyBioseq(seq, index);
405 }
406 
407 
410  int index) const
411 {
412  return SetSet().TakeBioseq(seq, index);
413 }
414 
415 
418 {
419  return SetSet().AttachEntry(entry, index);
420 }
421 
422 
425  int index) const
426 {
427  return SetSet().CopyEntry(entry, index);
428 }
429 
430 
433  int index) const
434 {
435  return SetSet().TakeEntry(entry, index);
436 }
437 
438 
441  int index) const
442 {
443  return SetSet().AttachEntry(entry, index);
444 }
445 
446 
449 {
450  return AttachAnnot(Ref(new CSeq_annot_Info(annot)));
451  // return x_GetScopeImpl().AttachAnnot(*this, annot);
452 }
453 
456 {
458  CCommandProcessor processor(x_GetScopeImpl());
459  return processor.run(new TCommand(*this, annot, x_GetScopeImpl()));
460 }
461 
462 
465 {
466  return AttachAnnot(Ref(new CSeq_annot_Info(annot.x_GetInfo(), 0)));
467  // return x_GetScopeImpl().CopyAnnot(*this, annot);
468 }
469 
470 
473 {
474  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
475  annot.Remove();
476  CSeq_annot_EditHandle handle = AttachAnnot(annot);
477  tr->Commit();
478  return handle;
479  // return x_GetScopeImpl().TakeAnnot(*this, annot);
480 }
481 
482 
485 {
487  CCommandProcessor processor(x_GetScopeImpl());
488  return processor.run(new TCommand(*this, annot, x_GetScopeImpl()));
489  //return x_GetScopeImpl().AttachAnnot(*this, annot);
490 }
491 
492 
493 void
495 {
496  vector<CSeq_annot_EditHandle> annots;
497  // we have to copy all handles as moving annots directly could break iter
498  for ( CSeq_annot_CI it(entry, CSeq_annot_CI::eSearch_entry); it; ++it ) {
499  annots.push_back(it->GetEditHandle());
500  }
501  ITERATE ( vector<CSeq_annot_EditHandle>, it, annots ) {
502  TakeAnnot(*it);
503  }
504 }
505 
507 {
508  if (entry.IsSetDescr()) {
509  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
510  TDescr& descr = const_cast<TDescr&>(entry.GetDescr());
511  AddDescr(descr);
512  entry.ResetDescr();
513  tr->Commit();
514  }
515  // x_GetInfo().AddDescr(entry.x_GetInfo());
516  // entry.ResetDescr();
517 
518 }
519 
521 {
522  if( !GetParentEntry() ) {
523  typedef CRemoveTSE_EditCommand TCommand;
524  CCommandProcessor processor(x_GetScopeImpl());
525  processor.run(new TCommand(*this, x_GetScopeImpl()));
526  } else {
527  typedef CSeq_entry_Remove_EditCommand TCommand;
528  CCommandProcessor processor(x_GetScopeImpl());
529  processor.run(new TCommand(*this, x_GetScopeImpl()));
530  // x_GetScopeImpl().RemoveEntry(*this);
531  }
532 }
533 
534 
536 {
537  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
539  if ( set_class != CBioseq_set::eClass_not_set ) {
540  seqset.SetClass(set_class);
541  }
542  tr->Commit();
543  return seqset;
544 }
545 
546 
548 {
549  typedef CSeq_entry_SelectNone_EditCommand TCommand;
550  CCommandProcessor processor(x_GetScopeImpl());
551  processor.run(new TCommand(*this, x_GetScopeImpl()));
552  //x_GetScopeImpl().SelectNone(*this);
553 }
554 
555 
558 {
559  return SelectSet(Ref(new CBioseq_set_Info(seqset)));
560  //return x_GetScopeImpl().SelectSet(*this, seqset);
561 }
562 
565 {
568  CCommandProcessor processor(x_GetScopeImpl());
569  return processor.run(new TCommand(*this, seqset, x_GetScopeImpl()));
570 }
571 
572 
575 {
576  return SelectSet(Ref(new CBioseq_set_Info(seqset.x_GetInfo(),0)));
577  //return x_GetScopeImpl().CopySet(*this, seqset);
578 }
579 
580 
583 {
584  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
586  CBioseq_set_EditHandle handle = SelectSet(seqset);
587  tr->Commit();
588  return handle;
589  //return x_GetScopeImpl().TakeSet(*this, seqset);
590 }
591 
592 
595 {
598  CCommandProcessor processor(x_GetScopeImpl());
599  return processor.run(new TCommand(*this, seqset, x_GetScopeImpl()));
600  // return x_GetScopeImpl().SelectSet(*this, seqset);
601 }
602 
603 
605 {
606  return SelectSeq(Ref(new CBioseq_Info(seq)));
607  // return x_GetScopeImpl().SelectSeq(*this, seq);
608 }
609 
612 {
615  CCommandProcessor processor(x_GetScopeImpl());
616  return processor.run(new TCommand(*this, seq, x_GetScopeImpl()));
617 }
618 
621 {
622  return SelectSeq(Ref(new CBioseq_Info(seq.x_GetInfo(),0)));
623  // return x_GetScopeImpl().CopySeq(*this, seq);
624 }
625 
626 
629 {
630  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
632  CBioseq_EditHandle handle = SelectSeq(seq);
633  tr->Commit();
634  return handle;
635  // return x_GetScopeImpl().TakeSeq(*this, seq);
636 }
637 
638 
641 {
644  CCommandProcessor processor(x_GetScopeImpl());
645  return processor.run(new TCommand(*this, seq, x_GetScopeImpl()));
646  // return x_GetScopeImpl().SelectSeq(*this, seq);
647 }
648 
649 
652 {
653  if ( !IsSeq() ) {
654  NCBI_THROW(CObjMgrException, eModifyDataError,
655  "CSeq_entry_EditHandle::ConvertSeqToSet: "
656  "Seq-entry is not in 'seq' state");
657  }
658  CBioseq_EditHandle seq = SetSeq();
659  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
660  SelectNone();
662  _ASSERT(seq.IsRemoved());
663  _ASSERT(!seq);
664  CBioseq_set_EditHandle seqset = SelectSet(set_class);
665  seqset.AddNewEntry(-1).SelectSeq(seq);
666  _ASSERT(seq);
667  tr->Commit();
668  return seqset;
669 }
670 
671 
673 {
675  if ( entry.Which() == CSeq_entry::e_not_set ) {
676  NCBI_THROW(CObjMgrException, eModifyDataError,
677  "CSeq_entry_EditHandle::CollapseSet: "
678  "sub entry should be non-empty");
679  }
680  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
681  entry.TakeAllDescr(*this);
682  entry.TakeAllAnnots(*this);
683  if ( entry.IsSet() ) {
684  CBioseq_set_EditHandle seqset = entry.SetSet();
685  entry.SelectNone();
686  SelectNone();
687  _ASSERT(seqset.IsRemoved());
688  _ASSERT(!seqset);
689  SelectSet(seqset);
690  _ASSERT(seqset);
691  }
692  else {
693  CBioseq_EditHandle seq = entry.SetSeq();
694  entry.SelectNone();
695  SelectNone();
696  _ASSERT(seq.IsRemoved());
697  _ASSERT(!seq);
698  SelectSeq(seq);
699  _ASSERT(seq);
700  }
701  tr->Commit();
702 }
703 
706 {
708  if ( !entry.IsSeq() ) {
709  NCBI_THROW(CObjMgrException, eModifyDataError,
710  "CSeq_entry_EditHandle::ConvertSetToSeq: "
711  "sub entry should contain Bioseq");
712  }
713  CRef<IScopeTransaction_Impl> tr(x_GetScopeImpl().CreateTransaction());
714  entry.TakeAllDescr(*this);
715  entry.TakeAllAnnots(*this);
716  CBioseq_EditHandle seq = entry.SetSeq();
717  entry.SelectNone();
718  SelectNone();
719  _ASSERT(seq.IsRemoved());
720  _ASSERT(!seq);
721  SelectSeq(seq);
722  _ASSERT(seq);
723  tr->Commit();
724  return seq;
725 }
726 
727 ////////////////////////////////////////////////////////////////////////
729 {
730  x_GetInfo().SetDescr(v);
731 }
732 
733 
735 {
736  x_GetInfo().ResetDescr();
737 }
738 
739 
741 {
742  return x_GetInfo().AddSeqdesc(v);
743 }
744 
745 
747 {
748  return x_GetInfo().RemoveSeqdesc(v);
749 }
750 
751 
753 {
754  return x_GetInfo().ReplaceSeqdesc(old_desc, new_desc);
755 }
756 
757 
759 {
760  x_GetInfo().AddSeq_descr(v);
761 }
762 
763 
765 {
766  x_GetInfo();
767 }
768 
769 
CBioseq_EditHandle –.
CBioseq_Handle –.
CBioseq_set_EditHandle –.
CBioseq_set_Handle –.
CMDReturn< CMD >::TReturn run(CMD *cmd)
Base class for all object manager exceptions.
void Reset(void)
Definition: tse_handle.hpp:654
CBioseq_Handle GetBioseqHandle(const CSeq_id_Handle &id, int get_flag)
CSeq_annot_CI –.
CSeq_annot_Handle –.
@Seq_descr.hpp User-defined methods of the data storage class.
Definition: Seq_descr.hpp:55
CSeq_entry_CI –.
CSeq_entry_Handle –.
CSeq_entry_Handle –.
void SetDescr(TDescr &v)
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
void ResetDescr(void)
CConstRef< TObject > GetCompleteSeq_entry(void) const
Definition: Seq_entry.hpp:56
CSubmit_block –.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id) const
Get Bioseq handle from this TSE.
Definition: tse_handle.cpp:217
CSubmit_block & SetTopLevelSubmit_block() const
Definition: tse_handle.cpp:259
const CSubmit_block & GetTopLevelSubmit_block() const
More efficient direct access to Seq-submit.sub field.
Definition: tse_handle.cpp:253
bool IsTopLevelSeq_submit() const
Definition: tse_handle.cpp:247
const CSeq_submit & GetTopLevelSeq_submit() const
Return reference to top-level Seq-submit object Throw an exception if it's not available.
Definition: tse_handle.cpp:241
bool CanBeEdited(void) const
Return true if this TSE handle is local to scope and can be edited.
Definition: tse_handle.cpp:229
const CTSE_Info & GetTSE_Info(void) const
bool HasParent_Info(void) const
TBlobVersion GetBlobVersion(void) const
Definition: tse_info.hpp:877
const TBlobId & GetBlobId(void) const
Definition: tse_info.hpp:907
virtual void Commit()=0
IEditSaver * GetEditSaver(const Handle &handle)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
CBioseq_EditHandle GetEditHandle(const CBioseq_Handle &seq)
Get editable Biosec handle by regular one.
Definition: scope.cpp:301
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
TSet GetSet(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.
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 GetSeq(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.
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.
bool IsSet(void) const
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
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
bool IsSeq(void) const
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
Definition: ncbiobj.hpp:2015
void Swap(TThisType &ref)
Swaps the pointer with another reference.
Definition: ncbiobj.hpp:754
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
E_Choice
Choice variants.
Definition: Seq_entry_.hpp:87
@ e_not_set
No variant selected.
Definition: Seq_entry_.hpp:88
static MDB_envinfo info
Definition: mdb_load.c:37
#define _ASSERT
#define const
Definition: zconf.h:232
Modified on Tue May 28 05:50:21 2024 by modify_doxy.py rev. 669887