NCBI C++ ToolKit
SeqEdit_Cmd_.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id$
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  */
27 
28 /// @file SeqEdit_Cmd_.hpp
29 /// Data storage class.
30 ///
31 /// This file was generated by application DATATOOL
32 /// using the following specifications:
33 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqedit/seqedit.asn">seqedit.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqedit/seqedit.def">seqedit.def</a>
36 ///
37 /// ATTENTION:
38 /// Don't edit or commit this file into CVS as this file will
39 /// be overridden (by DATATOOL) without warning!
40 
41 #ifndef OBJECTS_SEQEDIT_SEQEDIT_CMD_BASE_HPP
42 #define OBJECTS_SEQEDIT_SEQEDIT_CMD_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
59 class CSeqEdit_Cmd_AddId;
77 
78 
79 // generated classes
80 
81 
82 /** @addtogroup dataspec_NCBI_SeqEdit
83  *
84  * @{
85  */
86 
87 /////////////////////////////////////////////////////////////////////////////
88 ///***************************************************************
89 ///
90 /// CSeqEdit_Cmd_Base --
91 ///
92 
94 {
96 public:
97  // constructor
98  CSeqEdit_Cmd_Base(void);
99  // destructor
100  virtual ~CSeqEdit_Cmd_Base(void);
101 
102  // type info
104 
105 
106  /// Choice variants.
107  enum E_Choice {
108  e_not_set = 0, ///< No variant selected
109  e_Add_id, ///< Add a new seq-id to bioseq
110  e_Remove_id, ///< Remove a seq-id from bioseq
111  e_Reset_ids, ///< Reset ids field of bioseq
112  e_Change_seqattr, ///< Change bioseq's attribure
113  e_Reset_seqattr, ///< Reset bioseq's attribute
114  e_Change_setattr, ///< Change bioseq-set's attribure
115  e_Reset_setattr, ///< Reset bioseq-set's attribute
116  e_Add_descr, ///< Add descriptors to an object
117  e_Set_descr, ///< Set an objects's descriptors
118  e_Reset_descr, ///< Reset an objects's descriptors
119  e_Add_desc, ///< Add a descriptor ot an object
120  e_Remove_desc, ///< Remove a descripor from an object
121  e_Attach_seq, ///< Attach a bioseq to seq entry
122  e_Attach_set, ///< Attach a bioseq-set to seq entry
123  e_Reset_seqentry, ///< Detach an object from seq entry
124  e_Attach_seqentry, ///< Attach a seq entry to bioseq-set
125  e_Remove_seqentry, ///< Remove a seq entry from bioseq-set
126  e_Attach_annot, ///< Add a compelte annotation
127  e_Remove_annot, ///< Remove an annotation object
128  e_Add_annot, ///< Add an annotaion object
129  e_Replace_annot ///< Replace an annotation object
130  };
131  /// Maximum+1 value of the choice variant enumerator.
133  e_MaxChoice = 22 ///< == e_Replace_annot+1
134  };
135 
136  /// Reset the whole object
137  virtual void Reset(void);
138 
139  /// Reset the selection (set it to e_not_set).
140  virtual void ResetSelection(void);
141 
142  /// Which variant is currently selected.
143  ///
144  /// @return
145  /// Choice state enumerator.
146  E_Choice Which(void) const;
147 
148  /// Verify selection, throw exception if it differs from the expected.
149  ///
150  /// @param index
151  /// Expected selection.
152  void CheckSelected(E_Choice index) const;
153 
154  /// Throw 'InvalidSelection' exception.
155  ///
156  /// @param index
157  /// Expected selection.
158  NCBI_NORETURN void ThrowInvalidSelection(E_Choice index) const;
159 
160  /// Retrieve selection name (for diagnostic purposes).
161  ///
162  /// @param index
163  /// One of possible selection states.
164  /// @return
165  /// Name string.
166  static string SelectionName(E_Choice index);
167 
168  /// Select the requested variant if needed.
169  ///
170  /// @param index
171  /// New selection state.
172  /// @param reset
173  /// Flag that defines the resetting of the variant data. The data will
174  /// be reset if either the current selection differs from the new one,
175  /// or the flag is set to eDoResetVariant.
177  /// Select the requested variant if needed,
178  /// allocating CObject variants from memory pool.
179  void Select(E_Choice index,
180  EResetVariant reset,
181  CObjectMemoryPool* pool);
182 
183  // types
205 
206  // getters
207  // setters
208 
209 
210  /// Check if variant Add_id is selected.
211  ///
212  /// Add_id type is defined as 'typedef CSeqEdit_Cmd_AddId TAdd_id'.
213  /// @return
214  /// - true, if the variant is selected.
215  /// - false, otherwise.
216  bool IsAdd_id(void) const;
217 
218  /// Get the variant data.
219  ///
220  /// @return
221  /// Reference to the data.
222  const TAdd_id& GetAdd_id(void) const;
223 
224  /// Select the variant.
225  ///
226  /// @return
227  /// Reference to the variant data.
228  TAdd_id& SetAdd_id(void);
229  /// Select the variant and set its data.
230  ///
231  /// @param value
232  /// Reference to the data.
233  void SetAdd_id(TAdd_id& value);
234 
235 
236  /// Check if variant Remove_id is selected.
237  ///
238  /// Remove_id type is defined as 'typedef CSeqEdit_Cmd_RemoveId TRemove_id'.
239  /// @return
240  /// - true, if the variant is selected.
241  /// - false, otherwise.
242  bool IsRemove_id(void) const;
243 
244  /// Get the variant data.
245  ///
246  /// @return
247  /// Reference to the data.
248  const TRemove_id& GetRemove_id(void) const;
249 
250  /// Select the variant.
251  ///
252  /// @return
253  /// Reference to the variant data.
254  TRemove_id& SetRemove_id(void);
255  /// Select the variant and set its data.
256  ///
257  /// @param value
258  /// Reference to the data.
259  void SetRemove_id(TRemove_id& value);
260 
261 
262  /// Check if variant Reset_ids is selected.
263  ///
264  /// Reset_ids type is defined as 'typedef CSeqEdit_Cmd_ResetIds TReset_ids'.
265  /// @return
266  /// - true, if the variant is selected.
267  /// - false, otherwise.
268  bool IsReset_ids(void) const;
269 
270  /// Get the variant data.
271  ///
272  /// @return
273  /// Reference to the data.
274  const TReset_ids& GetReset_ids(void) const;
275 
276  /// Select the variant.
277  ///
278  /// @return
279  /// Reference to the variant data.
280  TReset_ids& SetReset_ids(void);
281  /// Select the variant and set its data.
282  ///
283  /// @param value
284  /// Reference to the data.
285  void SetReset_ids(TReset_ids& value);
286 
287 
288  /// Check if variant Change_seqattr is selected.
289  ///
290  /// Change_seqattr type is defined as 'typedef CSeqEdit_Cmd_ChangeSeqAttr TChange_seqattr'.
291  /// @return
292  /// - true, if the variant is selected.
293  /// - false, otherwise.
294  bool IsChange_seqattr(void) const;
295 
296  /// Get the variant data.
297  ///
298  /// @return
299  /// Reference to the data.
300  const TChange_seqattr& GetChange_seqattr(void) const;
301 
302  /// Select the variant.
303  ///
304  /// @return
305  /// Reference to the variant data.
306  TChange_seqattr& SetChange_seqattr(void);
307  /// Select the variant and set its data.
308  ///
309  /// @param value
310  /// Reference to the data.
311  void SetChange_seqattr(TChange_seqattr& value);
312 
313 
314  /// Check if variant Reset_seqattr is selected.
315  ///
316  /// Reset_seqattr type is defined as 'typedef CSeqEdit_Cmd_ResetSeqAttr TReset_seqattr'.
317  /// @return
318  /// - true, if the variant is selected.
319  /// - false, otherwise.
320  bool IsReset_seqattr(void) const;
321 
322  /// Get the variant data.
323  ///
324  /// @return
325  /// Reference to the data.
326  const TReset_seqattr& GetReset_seqattr(void) const;
327 
328  /// Select the variant.
329  ///
330  /// @return
331  /// Reference to the variant data.
332  TReset_seqattr& SetReset_seqattr(void);
333  /// Select the variant and set its data.
334  ///
335  /// @param value
336  /// Reference to the data.
337  void SetReset_seqattr(TReset_seqattr& value);
338 
339 
340  /// Check if variant Change_setattr is selected.
341  ///
342  /// Change_setattr type is defined as 'typedef CSeqEdit_Cmd_ChangeSetAttr TChange_setattr'.
343  /// @return
344  /// - true, if the variant is selected.
345  /// - false, otherwise.
346  bool IsChange_setattr(void) const;
347 
348  /// Get the variant data.
349  ///
350  /// @return
351  /// Reference to the data.
352  const TChange_setattr& GetChange_setattr(void) const;
353 
354  /// Select the variant.
355  ///
356  /// @return
357  /// Reference to the variant data.
358  TChange_setattr& SetChange_setattr(void);
359  /// Select the variant and set its data.
360  ///
361  /// @param value
362  /// Reference to the data.
363  void SetChange_setattr(TChange_setattr& value);
364 
365 
366  /// Check if variant Reset_setattr is selected.
367  ///
368  /// Reset_setattr type is defined as 'typedef CSeqEdit_Cmd_ResetSetAttr TReset_setattr'.
369  /// @return
370  /// - true, if the variant is selected.
371  /// - false, otherwise.
372  bool IsReset_setattr(void) const;
373 
374  /// Get the variant data.
375  ///
376  /// @return
377  /// Reference to the data.
378  const TReset_setattr& GetReset_setattr(void) const;
379 
380  /// Select the variant.
381  ///
382  /// @return
383  /// Reference to the variant data.
384  TReset_setattr& SetReset_setattr(void);
385  /// Select the variant and set its data.
386  ///
387  /// @param value
388  /// Reference to the data.
389  void SetReset_setattr(TReset_setattr& value);
390 
391 
392  /// Check if variant Add_descr is selected.
393  ///
394  /// Add_descr type is defined as 'typedef CSeqEdit_Cmd_AddDescr TAdd_descr'.
395  /// @return
396  /// - true, if the variant is selected.
397  /// - false, otherwise.
398  bool IsAdd_descr(void) const;
399 
400  /// Get the variant data.
401  ///
402  /// @return
403  /// Reference to the data.
404  const TAdd_descr& GetAdd_descr(void) const;
405 
406  /// Select the variant.
407  ///
408  /// @return
409  /// Reference to the variant data.
410  TAdd_descr& SetAdd_descr(void);
411  /// Select the variant and set its data.
412  ///
413  /// @param value
414  /// Reference to the data.
415  void SetAdd_descr(TAdd_descr& value);
416 
417 
418  /// Check if variant Set_descr is selected.
419  ///
420  /// Set_descr type is defined as 'typedef CSeqEdit_Cmd_SetDescr TSet_descr'.
421  /// @return
422  /// - true, if the variant is selected.
423  /// - false, otherwise.
424  bool IsSet_descr(void) const;
425 
426  /// Get the variant data.
427  ///
428  /// @return
429  /// Reference to the data.
430  const TSet_descr& GetSet_descr(void) const;
431 
432  /// Select the variant.
433  ///
434  /// @return
435  /// Reference to the variant data.
436  TSet_descr& SetSet_descr(void);
437  /// Select the variant and set its data.
438  ///
439  /// @param value
440  /// Reference to the data.
441  void SetSet_descr(TSet_descr& value);
442 
443 
444  /// Check if variant Reset_descr is selected.
445  ///
446  /// Reset_descr type is defined as 'typedef CSeqEdit_Cmd_ResetDescr TReset_descr'.
447  /// @return
448  /// - true, if the variant is selected.
449  /// - false, otherwise.
450  bool IsReset_descr(void) const;
451 
452  /// Get the variant data.
453  ///
454  /// @return
455  /// Reference to the data.
456  const TReset_descr& GetReset_descr(void) const;
457 
458  /// Select the variant.
459  ///
460  /// @return
461  /// Reference to the variant data.
462  TReset_descr& SetReset_descr(void);
463  /// Select the variant and set its data.
464  ///
465  /// @param value
466  /// Reference to the data.
467  void SetReset_descr(TReset_descr& value);
468 
469 
470  /// Check if variant Add_desc is selected.
471  ///
472  /// Add_desc type is defined as 'typedef CSeqEdit_Cmd_AddDesc TAdd_desc'.
473  /// @return
474  /// - true, if the variant is selected.
475  /// - false, otherwise.
476  bool IsAdd_desc(void) const;
477 
478  /// Get the variant data.
479  ///
480  /// @return
481  /// Reference to the data.
482  const TAdd_desc& GetAdd_desc(void) const;
483 
484  /// Select the variant.
485  ///
486  /// @return
487  /// Reference to the variant data.
488  TAdd_desc& SetAdd_desc(void);
489  /// Select the variant and set its data.
490  ///
491  /// @param value
492  /// Reference to the data.
493  void SetAdd_desc(TAdd_desc& value);
494 
495 
496  /// Check if variant Remove_desc is selected.
497  ///
498  /// Remove_desc type is defined as 'typedef CSeqEdit_Cmd_RemoveDesc TRemove_desc'.
499  /// @return
500  /// - true, if the variant is selected.
501  /// - false, otherwise.
502  bool IsRemove_desc(void) const;
503 
504  /// Get the variant data.
505  ///
506  /// @return
507  /// Reference to the data.
508  const TRemove_desc& GetRemove_desc(void) const;
509 
510  /// Select the variant.
511  ///
512  /// @return
513  /// Reference to the variant data.
514  TRemove_desc& SetRemove_desc(void);
515  /// Select the variant and set its data.
516  ///
517  /// @param value
518  /// Reference to the data.
519  void SetRemove_desc(TRemove_desc& value);
520 
521 
522  /// Check if variant Attach_seq is selected.
523  ///
524  /// Attach_seq type is defined as 'typedef CSeqEdit_Cmd_AttachSeq TAttach_seq'.
525  /// @return
526  /// - true, if the variant is selected.
527  /// - false, otherwise.
528  bool IsAttach_seq(void) const;
529 
530  /// Get the variant data.
531  ///
532  /// @return
533  /// Reference to the data.
534  const TAttach_seq& GetAttach_seq(void) const;
535 
536  /// Select the variant.
537  ///
538  /// @return
539  /// Reference to the variant data.
540  TAttach_seq& SetAttach_seq(void);
541  /// Select the variant and set its data.
542  ///
543  /// @param value
544  /// Reference to the data.
545  void SetAttach_seq(TAttach_seq& value);
546 
547 
548  /// Check if variant Attach_set is selected.
549  ///
550  /// Attach_set type is defined as 'typedef CSeqEdit_Cmd_AttachSet TAttach_set'.
551  /// @return
552  /// - true, if the variant is selected.
553  /// - false, otherwise.
554  bool IsAttach_set(void) const;
555 
556  /// Get the variant data.
557  ///
558  /// @return
559  /// Reference to the data.
560  const TAttach_set& GetAttach_set(void) const;
561 
562  /// Select the variant.
563  ///
564  /// @return
565  /// Reference to the variant data.
566  TAttach_set& SetAttach_set(void);
567  /// Select the variant and set its data.
568  ///
569  /// @param value
570  /// Reference to the data.
571  void SetAttach_set(TAttach_set& value);
572 
573 
574  /// Check if variant Reset_seqentry is selected.
575  ///
576  /// Reset_seqentry type is defined as 'typedef CSeqEdit_Cmd_ResetSeqEntry TReset_seqentry'.
577  /// @return
578  /// - true, if the variant is selected.
579  /// - false, otherwise.
580  bool IsReset_seqentry(void) const;
581 
582  /// Get the variant data.
583  ///
584  /// @return
585  /// Reference to the data.
586  const TReset_seqentry& GetReset_seqentry(void) const;
587 
588  /// Select the variant.
589  ///
590  /// @return
591  /// Reference to the variant data.
592  TReset_seqentry& SetReset_seqentry(void);
593  /// Select the variant and set its data.
594  ///
595  /// @param value
596  /// Reference to the data.
597  void SetReset_seqentry(TReset_seqentry& value);
598 
599 
600  /// Check if variant Attach_seqentry is selected.
601  ///
602  /// Attach_seqentry type is defined as 'typedef CSeqEdit_Cmd_AttachSeqEntry TAttach_seqentry'.
603  /// @return
604  /// - true, if the variant is selected.
605  /// - false, otherwise.
606  bool IsAttach_seqentry(void) const;
607 
608  /// Get the variant data.
609  ///
610  /// @return
611  /// Reference to the data.
612  const TAttach_seqentry& GetAttach_seqentry(void) const;
613 
614  /// Select the variant.
615  ///
616  /// @return
617  /// Reference to the variant data.
618  TAttach_seqentry& SetAttach_seqentry(void);
619  /// Select the variant and set its data.
620  ///
621  /// @param value
622  /// Reference to the data.
623  void SetAttach_seqentry(TAttach_seqentry& value);
624 
625 
626  /// Check if variant Remove_seqentry is selected.
627  ///
628  /// Remove_seqentry type is defined as 'typedef CSeqEdit_Cmd_RemoveSeqEntry TRemove_seqentry'.
629  /// @return
630  /// - true, if the variant is selected.
631  /// - false, otherwise.
632  bool IsRemove_seqentry(void) const;
633 
634  /// Get the variant data.
635  ///
636  /// @return
637  /// Reference to the data.
638  const TRemove_seqentry& GetRemove_seqentry(void) const;
639 
640  /// Select the variant.
641  ///
642  /// @return
643  /// Reference to the variant data.
644  TRemove_seqentry& SetRemove_seqentry(void);
645  /// Select the variant and set its data.
646  ///
647  /// @param value
648  /// Reference to the data.
649  void SetRemove_seqentry(TRemove_seqentry& value);
650 
651 
652  /// Check if variant Attach_annot is selected.
653  ///
654  /// Attach_annot type is defined as 'typedef CSeqEdit_Cmd_AttachAnnot TAttach_annot'.
655  /// @return
656  /// - true, if the variant is selected.
657  /// - false, otherwise.
658  bool IsAttach_annot(void) const;
659 
660  /// Get the variant data.
661  ///
662  /// @return
663  /// Reference to the data.
664  const TAttach_annot& GetAttach_annot(void) const;
665 
666  /// Select the variant.
667  ///
668  /// @return
669  /// Reference to the variant data.
670  TAttach_annot& SetAttach_annot(void);
671  /// Select the variant and set its data.
672  ///
673  /// @param value
674  /// Reference to the data.
675  void SetAttach_annot(TAttach_annot& value);
676 
677 
678  /// Check if variant Remove_annot is selected.
679  ///
680  /// Remove_annot type is defined as 'typedef CSeqEdit_Cmd_RemoveAnnot TRemove_annot'.
681  /// @return
682  /// - true, if the variant is selected.
683  /// - false, otherwise.
684  bool IsRemove_annot(void) const;
685 
686  /// Get the variant data.
687  ///
688  /// @return
689  /// Reference to the data.
690  const TRemove_annot& GetRemove_annot(void) const;
691 
692  /// Select the variant.
693  ///
694  /// @return
695  /// Reference to the variant data.
696  TRemove_annot& SetRemove_annot(void);
697  /// Select the variant and set its data.
698  ///
699  /// @param value
700  /// Reference to the data.
701  void SetRemove_annot(TRemove_annot& value);
702 
703 
704  /// Check if variant Add_annot is selected.
705  ///
706  /// Add_annot type is defined as 'typedef CSeqEdit_Cmd_AddAnnot TAdd_annot'.
707  /// @return
708  /// - true, if the variant is selected.
709  /// - false, otherwise.
710  bool IsAdd_annot(void) const;
711 
712  /// Get the variant data.
713  ///
714  /// @return
715  /// Reference to the data.
716  const TAdd_annot& GetAdd_annot(void) const;
717 
718  /// Select the variant.
719  ///
720  /// @return
721  /// Reference to the variant data.
722  TAdd_annot& SetAdd_annot(void);
723  /// Select the variant and set its data.
724  ///
725  /// @param value
726  /// Reference to the data.
727  void SetAdd_annot(TAdd_annot& value);
728 
729 
730  /// Check if variant Replace_annot is selected.
731  ///
732  /// Replace_annot type is defined as 'typedef CSeqEdit_Cmd_ReplaceAnnot TReplace_annot'.
733  /// @return
734  /// - true, if the variant is selected.
735  /// - false, otherwise.
736  bool IsReplace_annot(void) const;
737 
738  /// Get the variant data.
739  ///
740  /// @return
741  /// Reference to the data.
742  const TReplace_annot& GetReplace_annot(void) const;
743 
744  /// Select the variant.
745  ///
746  /// @return
747  /// Reference to the variant data.
748  TReplace_annot& SetReplace_annot(void);
749  /// Select the variant and set its data.
750  ///
751  /// @param value
752  /// Reference to the data.
753  void SetReplace_annot(TReplace_annot& value);
754 
755 
756 private:
757  // copy constructor and assignment operator
760  // choice state
762  // helper methods
763  void DoSelect(E_Choice index, CObjectMemoryPool* pool = 0);
764 
765  static const char* const sm_SelectionNames[];
766  // data
767  NCBI_NS_NCBI::CSerialObject *m_object;
768 };
769 
770 /* @} */
771 
772 
773 
774 
775 
776 ///////////////////////////////////////////////////////////
777 ///////////////////// inline methods //////////////////////
778 ///////////////////////////////////////////////////////////
779 inline
781 {
782  return m_choice;
783 }
784 
785 inline
787 {
788  if ( m_choice != index )
789  ThrowInvalidSelection(index);
790 }
791 
792 inline
793 void CSeqEdit_Cmd_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset, NCBI_NS_NCBI::CObjectMemoryPool* pool)
794 {
795  if ( reset == NCBI_NS_NCBI::eDoResetVariant || m_choice != index ) {
796  if ( m_choice != e_not_set )
797  ResetSelection();
798  DoSelect(index, pool);
799  }
800 }
801 
802 inline
803 void CSeqEdit_Cmd_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset)
804 {
805  Select(index, reset, 0);
806 }
807 
808 inline
810 {
811  return m_choice == e_Add_id;
812 }
813 
814 inline
816 {
817  return m_choice == e_Remove_id;
818 }
819 
820 inline
822 {
823  return m_choice == e_Reset_ids;
824 }
825 
826 inline
828 {
829  return m_choice == e_Change_seqattr;
830 }
831 
832 inline
834 {
835  return m_choice == e_Reset_seqattr;
836 }
837 
838 inline
840 {
841  return m_choice == e_Change_setattr;
842 }
843 
844 inline
846 {
847  return m_choice == e_Reset_setattr;
848 }
849 
850 inline
852 {
853  return m_choice == e_Add_descr;
854 }
855 
856 inline
858 {
859  return m_choice == e_Set_descr;
860 }
861 
862 inline
864 {
865  return m_choice == e_Reset_descr;
866 }
867 
868 inline
870 {
871  return m_choice == e_Add_desc;
872 }
873 
874 inline
876 {
877  return m_choice == e_Remove_desc;
878 }
879 
880 inline
882 {
883  return m_choice == e_Attach_seq;
884 }
885 
886 inline
888 {
889  return m_choice == e_Attach_set;
890 }
891 
892 inline
894 {
895  return m_choice == e_Reset_seqentry;
896 }
897 
898 inline
900 {
901  return m_choice == e_Attach_seqentry;
902 }
903 
904 inline
906 {
907  return m_choice == e_Remove_seqentry;
908 }
909 
910 inline
912 {
913  return m_choice == e_Attach_annot;
914 }
915 
916 inline
918 {
919  return m_choice == e_Remove_annot;
920 }
921 
922 inline
924 {
925  return m_choice == e_Add_annot;
926 }
927 
928 inline
930 {
931  return m_choice == e_Replace_annot;
932 }
933 
934 ///////////////////////////////////////////////////////////
935 ////////////////// end of inline methods //////////////////
936 ///////////////////////////////////////////////////////////
937 
938 
939 
940 
941 
942 END_objects_SCOPE // namespace ncbi::objects::
943 
945 
946 
947 #endif // OBJECTS_SEQEDIT_SEQEDIT_CMD_BASE_HPP
CSeqEdit_Cmd_AddAnnot –.
CSeqEdit_Cmd_AddDesc –.
CSeqEdit_Cmd_AddDescr –.
CSeqEdit_Cmd_AddId –.
CSeqEdit_Cmd_AttachAnnot –.
CSeqEdit_Cmd_AttachSeqEntry –.
CSeqEdit_Cmd_AttachSeq –.
CSeqEdit_Cmd_AttachSet –.
***************************************************************
CSeqEdit_Cmd_ChangeSeqAttr –.
CSeqEdit_Cmd_ChangeSetAttr –.
CSeqEdit_Cmd_RemoveAnnot –.
CSeqEdit_Cmd_RemoveDesc –.
CSeqEdit_Cmd_RemoveId –.
CSeqEdit_Cmd_RemoveSeqEntry –.
CSeqEdit_Cmd_ReplaceAnnot –.
CSeqEdit_Cmd_ResetDescr –.
CSeqEdit_Cmd_ResetIds –.
CSeqEdit_Cmd_ResetSeqAttr –.
CSeqEdit_Cmd_ResetSeqEntry –.
CSeqEdit_Cmd_ResetSetAttr –.
CSeqEdit_Cmd_SetDescr –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
EResetVariant
Definition: serialbase.hpp:76
@ eDoResetVariant
Definition: serialbase.hpp:77
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_SEQEDIT_EXPORT
Definition: ncbi_export.h:801
E_Choice Which(void) const
Which variant is currently selected.
bool IsRemove_annot(void) const
Check if variant Remove_annot is selected.
CSeqEdit_Cmd_ChangeSeqAttr TChange_seqattr
CSeqEdit_Cmd_RemoveAnnot TRemove_annot
CSeqEdit_Cmd_AddAnnot TAdd_annot
bool IsChange_seqattr(void) const
Check if variant Change_seqattr is selected.
bool IsAdd_desc(void) const
Check if variant Add_desc is selected.
CSeqEdit_Cmd_SetDescr TSet_descr
CSeqEdit_Cmd_ResetSeqAttr TReset_seqattr
CSerialObject Tparent
bool IsReset_seqentry(void) const
Check if variant Reset_seqentry is selected.
bool IsReset_ids(void) const
Check if variant Reset_ids is selected.
CSeqEdit_Cmd_RemoveSeqEntry TRemove_seqentry
CSeqEdit_Cmd_ChangeSetAttr TChange_setattr
CSeqEdit_Cmd_ResetSeqEntry TReset_seqentry
bool IsSet_descr(void) const
Check if variant Set_descr is selected.
bool IsAdd_annot(void) const
Check if variant Add_annot is selected.
CSeqEdit_Cmd_AddId TAdd_id
bool IsAttach_seq(void) const
Check if variant Attach_seq is selected.
E_Choice
Choice variants.
CSeqEdit_Cmd_ResetSetAttr TReset_setattr
NCBI_NS_NCBI::CSerialObject * m_object
bool IsAdd_descr(void) const
Check if variant Add_descr is selected.
bool IsReset_descr(void) const
Check if variant Reset_descr is selected.
CSeqEdit_Cmd_RemoveId TRemove_id
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
CSeqEdit_Cmd_AttachSeq TAttach_seq
bool IsRemove_seqentry(void) const
Check if variant Remove_seqentry is selected.
bool IsAttach_seqentry(void) const
Check if variant Attach_seqentry is selected.
CSeqEdit_Cmd_AttachSeqEntry TAttach_seqentry
CSeqEdit_Cmd_AddDescr TAdd_descr
bool IsAdd_id(void) const
Check if variant Add_id is selected.
CSeqEdit_Cmd_ReplaceAnnot TReplace_annot
bool IsReset_setattr(void) const
Check if variant Reset_setattr is selected.
bool IsReplace_annot(void) const
Check if variant Replace_annot is selected.
bool IsRemove_id(void) const
Check if variant Remove_id is selected.
CSeqEdit_Cmd_Base(const CSeqEdit_Cmd_Base &)
CSeqEdit_Cmd_RemoveDesc TRemove_desc
bool IsRemove_desc(void) const
Check if variant Remove_desc is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
bool IsAttach_set(void) const
Check if variant Attach_set is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
CSeqEdit_Cmd_AttachAnnot TAttach_annot
bool IsReset_seqattr(void) const
Check if variant Reset_seqattr is selected.
CSeqEdit_Cmd_ResetDescr TReset_descr
bool IsAttach_annot(void) const
Check if variant Attach_annot is selected.
CSeqEdit_Cmd_AddDesc TAdd_desc
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
CSeqEdit_Cmd_AttachSet TAttach_set
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
bool IsChange_setattr(void) const
Check if variant Change_setattr is selected.
CSeqEdit_Cmd_ResetIds TReset_ids
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
CSeqEdit_Cmd_Base & operator=(const CSeqEdit_Cmd_Base &)
@ e_Remove_seqentry
Remove a seq entry from bioseq-set.
@ e_Add_descr
Add descriptors to an object.
@ e_Attach_seqentry
Attach a seq entry to bioseq-set.
@ e_Add_desc
Add a descriptor ot an object.
@ e_not_set
No variant selected.
@ e_Attach_seq
Attach a bioseq to seq entry.
@ e_Remove_id
Remove a seq-id from bioseq.
@ e_Reset_seqentry
Detach an object from seq entry.
@ e_Attach_annot
Add a compelte annotation.
@ e_Reset_setattr
Reset bioseq-set's attribute.
@ e_Reset_ids
Reset ids field of bioseq.
@ e_Add_annot
Add an annotaion object.
@ e_Remove_desc
Remove a descripor from an object.
@ e_Set_descr
Set an objects's descriptors.
@ e_Remove_annot
Remove an annotation object.
@ e_Change_setattr
Change bioseq-set's attribure.
@ e_Attach_set
Attach a bioseq-set to seq entry.
@ e_Replace_annot
Replace an annotation object.
@ e_Add_id
Add a new seq-id to bioseq.
@ e_Reset_descr
Reset an objects's descriptors.
@ e_Reset_seqattr
Reset bioseq's attribute.
@ e_Change_seqattr
Change bioseq's attribure.
@ e_not_set
Modified on Tue Dec 05 02:10:16 2023 by modify_doxy.py rev. 669887