NCBI C++ ToolKit
Seqdesc_.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 Seqdesc_.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/seq/seq.asn">seq.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seq/seq.def">seq.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_SEQ_SEQDESC_BASE_HPP
42 #define OBJECTS_SEQ_SEQDESC_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #include <string>
51 #include <objects/seq/GIBB_mod.hpp>
52 #include <objects/seq/GIBB_mol.hpp>
54 
56 
57 #ifndef BEGIN_objects_SCOPE
58 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
59 # define END_objects_SCOPE END_SCOPE(objects)
60 #endif
61 BEGIN_objects_SCOPE // namespace ncbi::objects::
62 
63 
64 // forward declarations
65 class CBioSource;
66 class CDate;
67 class CDbtag;
68 class CEMBL_block;
69 class CGB_block;
71 class CMolInfo;
72 class CNumbering;
73 class COrg_ref;
74 class CPDB_block;
75 class CPIR_block;
76 class CPRF_block;
77 class CPubdesc;
78 class CSP_block;
79 class CUser_object;
80 
81 
82 // generated classes
83 
84 
85 /** @addtogroup dataspec_NCBI_Sequence
86  *
87  * @{
88  */
89 
90 /////////////////////////////////////////////////////////////////////////////
91 ///
92 /// CSeqdesc_Base --
93 ///
94 
96 {
98 public:
99  // constructor
100  CSeqdesc_Base(void);
101  // destructor
102  virtual ~CSeqdesc_Base(void);
103 
104  // type info
106 
107 
108  /// Choice variants.
109  enum E_Choice {
110  e_not_set = 0, ///< No variant selected
111  e_Mol_type, ///< type of molecule
112  e_Modif, ///< modifiers
113  e_Method, ///< sequencing method
114  e_Name, ///< a name for this sequence
115  e_Title, ///< a title for this sequence
116  e_Org, ///< if all from one organism
117  e_Comment, ///< a more extensive comment
118  e_Num, ///< a numbering system
119  e_Maploc, ///< map location of this sequence
120  e_Pir, ///< PIR specific info
121  e_Genbank, ///< GenBank specific info
122  e_Pub, ///< a reference to the publication
123  e_Region, ///< overall region (globin locus)
124  e_User, ///< user defined object
125  e_Sp, ///< SWISSPROT specific info
126  e_Dbxref, ///< xref to other databases
127  e_Embl, ///< EMBL specific information
128  e_Create_date, ///< date entry first created/released
129  e_Update_date, ///< date of last update
130  e_Prf, ///< PRF specific information
131  e_Pdb, ///< PDB specific information
132  e_Het, ///< cofactor, etc associated but not bound
133  e_Source, ///< source of materials, includes Org-ref
134  e_Molinfo, ///< info on the molecule and techniques
135  e_Modelev ///< model evidence for XM records
136  };
137  /// Maximum+1 value of the choice variant enumerator.
139  e_MaxChoice = 26 ///< == e_Modelev+1
140  };
141 
142  /// Reset the whole object
143  virtual void Reset(void);
144 
145  /// Reset the selection (set it to e_not_set).
146  virtual void ResetSelection(void);
147 
148  /// Which variant is currently selected.
149  ///
150  /// @return
151  /// Choice state enumerator.
152  E_Choice Which(void) const;
153 
154  /// Verify selection, throw exception if it differs from the expected.
155  ///
156  /// @param index
157  /// Expected selection.
158  void CheckSelected(E_Choice index) const;
159 
160  /// Throw 'InvalidSelection' exception.
161  ///
162  /// @param index
163  /// Expected selection.
164  NCBI_NORETURN void ThrowInvalidSelection(E_Choice index) const;
165 
166  /// Retrieve selection name (for diagnostic purposes).
167  ///
168  /// @param index
169  /// One of possible selection states.
170  /// @return
171  /// Name string.
172  static string SelectionName(E_Choice index);
173 
174  /// Select the requested variant if needed.
175  ///
176  /// @param index
177  /// New selection state.
178  /// @param reset
179  /// Flag that defines the resetting of the variant data. The data will
180  /// be reset if either the current selection differs from the new one,
181  /// or the flag is set to eDoResetVariant.
183  /// Select the requested variant if needed,
184  /// allocating CObject variants from memory pool.
185  void Select(E_Choice index,
186  EResetVariant reset,
187  CObjectMemoryPool* pool);
188 
189  // types
191  typedef list< EGIBB_mod > TModif;
193  typedef string TName;
194  typedef string TTitle;
195  typedef COrg_ref TOrg;
196  typedef string TComment;
197  typedef CNumbering TNum;
198  typedef CDbtag TMaploc;
199  typedef CPIR_block TPir;
201  typedef CPubdesc TPub;
202  typedef string TRegion;
204  typedef CSP_block TSp;
205  typedef CDbtag TDbxref;
209  typedef CPRF_block TPrf;
210  typedef CPDB_block TPdb;
211  typedef CHeterogen THet;
215 
216  // getters
217  // setters
218 
219 
220  /// Check if variant Mol_type is selected.
221  ///
222  /// Mol_type type is defined as 'typedef EGIBB_mol TMol_type'.
223  /// @return
224  /// - true, if the variant is selected.
225  /// - false, otherwise.
226  bool IsMol_type(void) const;
227 
228  /// Get the variant data.
229  ///
230  /// @return
231  /// Copy of the variant data.
232  TMol_type GetMol_type(void) const;
233 
234  /// Select the variant.
235  ///
236  /// @return
237  /// Reference to the variant data.
238  TMol_type& SetMol_type(void);
239 
240  /// Select the variant and set its data.
241  ///
242  /// @param value
243  /// Variant data.
244  void SetMol_type(TMol_type value);
245 
246 
247  /// Check if variant Modif is selected.
248  ///
249  /// Modif type is defined as 'typedef list< EGIBB_mod > TModif'.
250  /// @return
251  /// - true, if the variant is selected.
252  /// - false, otherwise.
253  bool IsModif(void) const;
254 
255  /// Get the variant data.
256  ///
257  /// @return
258  /// Reference to the data.
259  const TModif& GetModif(void) const;
260 
261  /// Select the variant.
262  ///
263  /// @return
264  /// Reference to the variant data.
265  TModif& SetModif(void);
266 
267 
268  /// Check if variant Method is selected.
269  ///
270  /// Method type is defined as 'typedef EGIBB_method TMethod'.
271  /// @return
272  /// - true, if the variant is selected.
273  /// - false, otherwise.
274  bool IsMethod(void) const;
275 
276  /// Get the variant data.
277  ///
278  /// @return
279  /// Copy of the variant data.
280  TMethod GetMethod(void) const;
281 
282  /// Select the variant.
283  ///
284  /// @return
285  /// Reference to the variant data.
286  TMethod& SetMethod(void);
287 
288  /// Select the variant and set its data.
289  ///
290  /// @param value
291  /// Variant data.
292  void SetMethod(TMethod value);
293 
294 
295  /// Check if variant Name is selected.
296  ///
297  /// Name type is defined as 'typedef string TName'.
298  /// @return
299  /// - true, if the variant is selected.
300  /// - false, otherwise.
301  bool IsName(void) const;
302 
303  /// Get the variant data.
304  ///
305  /// @return
306  /// Reference to the data.
307  const TName& GetName(void) const;
308 
309  /// Select the variant.
310  ///
311  /// @return
312  /// Reference to the variant data.
313  TName& SetName(void);
314 
315  /// Select the variant and set its data.
316  ///
317  /// @param value
318  /// Variant data.
319  void SetName(const TName& value);
320 
321 
322  /// Check if variant Title is selected.
323  ///
324  /// Title type is defined as 'typedef string TTitle'.
325  /// @return
326  /// - true, if the variant is selected.
327  /// - false, otherwise.
328  bool IsTitle(void) const;
329 
330  /// Get the variant data.
331  ///
332  /// @return
333  /// Reference to the data.
334  const TTitle& GetTitle(void) const;
335 
336  /// Select the variant.
337  ///
338  /// @return
339  /// Reference to the variant data.
340  TTitle& SetTitle(void);
341 
342  /// Select the variant and set its data.
343  ///
344  /// @param value
345  /// Variant data.
346  void SetTitle(const TTitle& value);
347 
348 
349  /// Check if variant Org is selected.
350  ///
351  /// Org type is defined as 'typedef COrg_ref TOrg'.
352  /// @return
353  /// - true, if the variant is selected.
354  /// - false, otherwise.
355  bool IsOrg(void) const;
356 
357  /// Get the variant data.
358  ///
359  /// @return
360  /// Reference to the data.
361  const TOrg& GetOrg(void) const;
362 
363  /// Select the variant.
364  ///
365  /// @return
366  /// Reference to the variant data.
367  TOrg& SetOrg(void);
368  /// Select the variant and set its data.
369  ///
370  /// @param value
371  /// Reference to the data.
372  void SetOrg(TOrg& value);
373 
374 
375  /// Check if variant Comment is selected.
376  ///
377  /// Comment type is defined as 'typedef string TComment'.
378  /// @return
379  /// - true, if the variant is selected.
380  /// - false, otherwise.
381  bool IsComment(void) const;
382 
383  /// Get the variant data.
384  ///
385  /// @return
386  /// Reference to the data.
387  const TComment& GetComment(void) const;
388 
389  /// Select the variant.
390  ///
391  /// @return
392  /// Reference to the variant data.
393  TComment& SetComment(void);
394 
395  /// Select the variant and set its data.
396  ///
397  /// @param value
398  /// Variant data.
399  void SetComment(const TComment& value);
400 
401 
402  /// Check if variant Num is selected.
403  ///
404  /// Num type is defined as 'typedef CNumbering TNum'.
405  /// @return
406  /// - true, if the variant is selected.
407  /// - false, otherwise.
408  bool IsNum(void) const;
409 
410  /// Get the variant data.
411  ///
412  /// @return
413  /// Reference to the data.
414  const TNum& GetNum(void) const;
415 
416  /// Select the variant.
417  ///
418  /// @return
419  /// Reference to the variant data.
420  TNum& SetNum(void);
421  /// Select the variant and set its data.
422  ///
423  /// @param value
424  /// Reference to the data.
425  void SetNum(TNum& value);
426 
427 
428  /// Check if variant Maploc is selected.
429  ///
430  /// Maploc type is defined as 'typedef CDbtag TMaploc'.
431  /// @return
432  /// - true, if the variant is selected.
433  /// - false, otherwise.
434  bool IsMaploc(void) const;
435 
436  /// Get the variant data.
437  ///
438  /// @return
439  /// Reference to the data.
440  const TMaploc& GetMaploc(void) const;
441 
442  /// Select the variant.
443  ///
444  /// @return
445  /// Reference to the variant data.
446  TMaploc& SetMaploc(void);
447  /// Select the variant and set its data.
448  ///
449  /// @param value
450  /// Reference to the data.
451  void SetMaploc(TMaploc& value);
452 
453 
454  /// Check if variant Pir is selected.
455  ///
456  /// Pir type is defined as 'typedef CPIR_block TPir'.
457  /// @return
458  /// - true, if the variant is selected.
459  /// - false, otherwise.
460  bool IsPir(void) const;
461 
462  /// Get the variant data.
463  ///
464  /// @return
465  /// Reference to the data.
466  const TPir& GetPir(void) const;
467 
468  /// Select the variant.
469  ///
470  /// @return
471  /// Reference to the variant data.
472  TPir& SetPir(void);
473  /// Select the variant and set its data.
474  ///
475  /// @param value
476  /// Reference to the data.
477  void SetPir(TPir& value);
478 
479 
480  /// Check if variant Genbank is selected.
481  ///
482  /// Genbank type is defined as 'typedef CGB_block TGenbank'.
483  /// @return
484  /// - true, if the variant is selected.
485  /// - false, otherwise.
486  bool IsGenbank(void) const;
487 
488  /// Get the variant data.
489  ///
490  /// @return
491  /// Reference to the data.
492  const TGenbank& GetGenbank(void) const;
493 
494  /// Select the variant.
495  ///
496  /// @return
497  /// Reference to the variant data.
498  TGenbank& SetGenbank(void);
499  /// Select the variant and set its data.
500  ///
501  /// @param value
502  /// Reference to the data.
503  void SetGenbank(TGenbank& value);
504 
505 
506  /// Check if variant Pub is selected.
507  ///
508  /// Pub type is defined as 'typedef CPubdesc TPub'.
509  /// @return
510  /// - true, if the variant is selected.
511  /// - false, otherwise.
512  bool IsPub(void) const;
513 
514  /// Get the variant data.
515  ///
516  /// @return
517  /// Reference to the data.
518  const TPub& GetPub(void) const;
519 
520  /// Select the variant.
521  ///
522  /// @return
523  /// Reference to the variant data.
524  TPub& SetPub(void);
525  /// Select the variant and set its data.
526  ///
527  /// @param value
528  /// Reference to the data.
529  void SetPub(TPub& value);
530 
531 
532  /// Check if variant Region is selected.
533  ///
534  /// Region type is defined as 'typedef string TRegion'.
535  /// @return
536  /// - true, if the variant is selected.
537  /// - false, otherwise.
538  bool IsRegion(void) const;
539 
540  /// Get the variant data.
541  ///
542  /// @return
543  /// Reference to the data.
544  const TRegion& GetRegion(void) const;
545 
546  /// Select the variant.
547  ///
548  /// @return
549  /// Reference to the variant data.
550  TRegion& SetRegion(void);
551 
552  /// Select the variant and set its data.
553  ///
554  /// @param value
555  /// Variant data.
556  void SetRegion(const TRegion& value);
557 
558 
559  /// Check if variant User is selected.
560  ///
561  /// User type is defined as 'typedef CUser_object TUser'.
562  /// @return
563  /// - true, if the variant is selected.
564  /// - false, otherwise.
565  bool IsUser(void) const;
566 
567  /// Get the variant data.
568  ///
569  /// @return
570  /// Reference to the data.
571  const TUser& GetUser(void) const;
572 
573  /// Select the variant.
574  ///
575  /// @return
576  /// Reference to the variant data.
577  TUser& SetUser(void);
578  /// Select the variant and set its data.
579  ///
580  /// @param value
581  /// Reference to the data.
582  void SetUser(TUser& value);
583 
584 
585  /// Check if variant Sp is selected.
586  ///
587  /// Sp type is defined as 'typedef CSP_block TSp'.
588  /// @return
589  /// - true, if the variant is selected.
590  /// - false, otherwise.
591  bool IsSp(void) const;
592 
593  /// Get the variant data.
594  ///
595  /// @return
596  /// Reference to the data.
597  const TSp& GetSp(void) const;
598 
599  /// Select the variant.
600  ///
601  /// @return
602  /// Reference to the variant data.
603  TSp& SetSp(void);
604  /// Select the variant and set its data.
605  ///
606  /// @param value
607  /// Reference to the data.
608  void SetSp(TSp& value);
609 
610 
611  /// Check if variant Dbxref is selected.
612  ///
613  /// Dbxref type is defined as 'typedef CDbtag TDbxref'.
614  /// @return
615  /// - true, if the variant is selected.
616  /// - false, otherwise.
617  bool IsDbxref(void) const;
618 
619  /// Get the variant data.
620  ///
621  /// @return
622  /// Reference to the data.
623  const TDbxref& GetDbxref(void) const;
624 
625  /// Select the variant.
626  ///
627  /// @return
628  /// Reference to the variant data.
629  TDbxref& SetDbxref(void);
630  /// Select the variant and set its data.
631  ///
632  /// @param value
633  /// Reference to the data.
634  void SetDbxref(TDbxref& value);
635 
636 
637  /// Check if variant Embl is selected.
638  ///
639  /// Embl type is defined as 'typedef CEMBL_block TEmbl'.
640  /// @return
641  /// - true, if the variant is selected.
642  /// - false, otherwise.
643  bool IsEmbl(void) const;
644 
645  /// Get the variant data.
646  ///
647  /// @return
648  /// Reference to the data.
649  const TEmbl& GetEmbl(void) const;
650 
651  /// Select the variant.
652  ///
653  /// @return
654  /// Reference to the variant data.
655  TEmbl& SetEmbl(void);
656  /// Select the variant and set its data.
657  ///
658  /// @param value
659  /// Reference to the data.
660  void SetEmbl(TEmbl& value);
661 
662 
663  /// Check if variant Create_date is selected.
664  ///
665  /// Create_date type is defined as 'typedef CDate TCreate_date'.
666  /// @return
667  /// - true, if the variant is selected.
668  /// - false, otherwise.
669  bool IsCreate_date(void) const;
670 
671  /// Get the variant data.
672  ///
673  /// @return
674  /// Reference to the data.
675  const TCreate_date& GetCreate_date(void) const;
676 
677  /// Select the variant.
678  ///
679  /// @return
680  /// Reference to the variant data.
681  TCreate_date& SetCreate_date(void);
682  /// Select the variant and set its data.
683  ///
684  /// @param value
685  /// Reference to the data.
686  void SetCreate_date(TCreate_date& value);
687 
688 
689  /// Check if variant Update_date is selected.
690  ///
691  /// Update_date type is defined as 'typedef CDate TUpdate_date'.
692  /// @return
693  /// - true, if the variant is selected.
694  /// - false, otherwise.
695  bool IsUpdate_date(void) const;
696 
697  /// Get the variant data.
698  ///
699  /// @return
700  /// Reference to the data.
701  const TUpdate_date& GetUpdate_date(void) const;
702 
703  /// Select the variant.
704  ///
705  /// @return
706  /// Reference to the variant data.
707  TUpdate_date& SetUpdate_date(void);
708  /// Select the variant and set its data.
709  ///
710  /// @param value
711  /// Reference to the data.
712  void SetUpdate_date(TUpdate_date& value);
713 
714 
715  /// Check if variant Prf is selected.
716  ///
717  /// Prf type is defined as 'typedef CPRF_block TPrf'.
718  /// @return
719  /// - true, if the variant is selected.
720  /// - false, otherwise.
721  bool IsPrf(void) const;
722 
723  /// Get the variant data.
724  ///
725  /// @return
726  /// Reference to the data.
727  const TPrf& GetPrf(void) const;
728 
729  /// Select the variant.
730  ///
731  /// @return
732  /// Reference to the variant data.
733  TPrf& SetPrf(void);
734  /// Select the variant and set its data.
735  ///
736  /// @param value
737  /// Reference to the data.
738  void SetPrf(TPrf& value);
739 
740 
741  /// Check if variant Pdb is selected.
742  ///
743  /// Pdb type is defined as 'typedef CPDB_block TPdb'.
744  /// @return
745  /// - true, if the variant is selected.
746  /// - false, otherwise.
747  bool IsPdb(void) const;
748 
749  /// Get the variant data.
750  ///
751  /// @return
752  /// Reference to the data.
753  const TPdb& GetPdb(void) const;
754 
755  /// Select the variant.
756  ///
757  /// @return
758  /// Reference to the variant data.
759  TPdb& SetPdb(void);
760  /// Select the variant and set its data.
761  ///
762  /// @param value
763  /// Reference to the data.
764  void SetPdb(TPdb& value);
765 
766 
767  /// Check if variant Het is selected.
768  ///
769  /// Het type is defined as 'typedef CHeterogen THet'.
770  /// @return
771  /// - true, if the variant is selected.
772  /// - false, otherwise.
773  bool IsHet(void) const;
774 
775  /// Get the variant data.
776  ///
777  /// @return
778  /// Reference to the data.
779  const THet& GetHet(void) const;
780 
781  /// Select the variant.
782  ///
783  /// @return
784  /// Reference to the variant data.
785  THet& SetHet(void);
786 
787  /// Select the variant and set its data.
788  ///
789  /// @param value
790  /// Variant data.
791  void SetHet(const THet& value);
792 
793 
794  /// Check if variant Source is selected.
795  ///
796  /// Source type is defined as 'typedef CBioSource TSource'.
797  /// @return
798  /// - true, if the variant is selected.
799  /// - false, otherwise.
800  bool IsSource(void) const;
801 
802  /// Get the variant data.
803  ///
804  /// @return
805  /// Reference to the data.
806  const TSource& GetSource(void) const;
807 
808  /// Select the variant.
809  ///
810  /// @return
811  /// Reference to the variant data.
812  TSource& SetSource(void);
813  /// Select the variant and set its data.
814  ///
815  /// @param value
816  /// Reference to the data.
817  void SetSource(TSource& value);
818 
819 
820  /// Check if variant Molinfo is selected.
821  ///
822  /// Molinfo type is defined as 'typedef CMolInfo TMolinfo'.
823  /// @return
824  /// - true, if the variant is selected.
825  /// - false, otherwise.
826  bool IsMolinfo(void) const;
827 
828  /// Get the variant data.
829  ///
830  /// @return
831  /// Reference to the data.
832  const TMolinfo& GetMolinfo(void) const;
833 
834  /// Select the variant.
835  ///
836  /// @return
837  /// Reference to the variant data.
838  TMolinfo& SetMolinfo(void);
839  /// Select the variant and set its data.
840  ///
841  /// @param value
842  /// Reference to the data.
843  void SetMolinfo(TMolinfo& value);
844 
845 
846  /// Check if variant Modelev is selected.
847  ///
848  /// Modelev type is defined as 'typedef CModelEvidenceSupport TModelev'.
849  /// @return
850  /// - true, if the variant is selected.
851  /// - false, otherwise.
852  bool IsModelev(void) const;
853 
854  /// Get the variant data.
855  ///
856  /// @return
857  /// Reference to the data.
858  const TModelev& GetModelev(void) const;
859 
860  /// Select the variant.
861  ///
862  /// @return
863  /// Reference to the variant data.
864  TModelev& SetModelev(void);
865  /// Select the variant and set its data.
866  ///
867  /// @param value
868  /// Reference to the data.
869  void SetModelev(TModelev& value);
870 
871 
872 private:
873  // copy constructor and assignment operator
876  // choice state
878  // helper methods
879  void DoSelect(E_Choice index, CObjectMemoryPool* pool = 0);
880 
881  static const char* const sm_SelectionNames[];
882  // data
883  union {
885  NCBI_NS_NCBI::CUnionBuffer<TModif> m_Modif;
887  NCBI_NS_NCBI::CUnionBuffer<THet> m_Het;
888  NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string> m_string;
889  NCBI_NS_NCBI::CSerialObject *m_object;
890  };
891 };
892 
893 /* @} */
894 
895 
896 
897 
898 
899 ///////////////////////////////////////////////////////////
900 ///////////////////// inline methods //////////////////////
901 ///////////////////////////////////////////////////////////
902 inline
904 {
905  return m_choice;
906 }
907 
908 inline
910 {
911  if ( m_choice != index )
912  ThrowInvalidSelection(index);
913 }
914 
915 inline
916 void CSeqdesc_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset, NCBI_NS_NCBI::CObjectMemoryPool* pool)
917 {
918  if ( reset == NCBI_NS_NCBI::eDoResetVariant || m_choice != index ) {
919  if ( m_choice != e_not_set )
920  ResetSelection();
921  DoSelect(index, pool);
922  }
923 }
924 
925 inline
926 void CSeqdesc_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset)
927 {
928  Select(index, reset, 0);
929 }
930 
931 inline
933 {
934  return m_choice == e_Mol_type;
935 }
936 
937 inline
939 {
941  return m_Mol_type;
942 }
943 
944 inline
946 {
948  return m_Mol_type;
949 }
950 
951 inline
953 {
955  m_Mol_type = value;
956 }
957 
958 inline
959 bool CSeqdesc_Base::IsModif(void) const
960 {
961  return m_choice == e_Modif;
962 }
963 
964 inline
966 {
968  return *m_Modif;
969 }
970 
971 inline
973 {
975  return *m_Modif;
976 }
977 
978 inline
979 bool CSeqdesc_Base::IsMethod(void) const
980 {
981  return m_choice == e_Method;
982 }
983 
984 inline
986 {
988  return m_Method;
989 }
990 
991 inline
993 {
995  return m_Method;
996 }
997 
998 inline
1000 {
1002  m_Method = value;
1003 }
1004 
1005 inline
1006 bool CSeqdesc_Base::IsName(void) const
1007 {
1008  return m_choice == e_Name;
1009 }
1010 
1011 inline
1013 {
1015  return *m_string;
1016 }
1017 
1018 inline
1020 {
1022  return *m_string;
1023 }
1024 
1025 inline
1026 bool CSeqdesc_Base::IsTitle(void) const
1027 {
1028  return m_choice == e_Title;
1029 }
1030 
1031 inline
1033 {
1035  return *m_string;
1036 }
1037 
1038 inline
1040 {
1042  return *m_string;
1043 }
1044 
1045 inline
1046 bool CSeqdesc_Base::IsOrg(void) const
1047 {
1048  return m_choice == e_Org;
1049 }
1050 
1051 inline
1053 {
1054  return m_choice == e_Comment;
1055 }
1056 
1057 inline
1059 {
1061  return *m_string;
1062 }
1063 
1064 inline
1066 {
1068  return *m_string;
1069 }
1070 
1071 inline
1072 bool CSeqdesc_Base::IsNum(void) const
1073 {
1074  return m_choice == e_Num;
1075 }
1076 
1077 inline
1078 bool CSeqdesc_Base::IsMaploc(void) const
1079 {
1080  return m_choice == e_Maploc;
1081 }
1082 
1083 inline
1084 bool CSeqdesc_Base::IsPir(void) const
1085 {
1086  return m_choice == e_Pir;
1087 }
1088 
1089 inline
1091 {
1092  return m_choice == e_Genbank;
1093 }
1094 
1095 inline
1096 bool CSeqdesc_Base::IsPub(void) const
1097 {
1098  return m_choice == e_Pub;
1099 }
1100 
1101 inline
1102 bool CSeqdesc_Base::IsRegion(void) const
1103 {
1104  return m_choice == e_Region;
1105 }
1106 
1107 inline
1109 {
1111  return *m_string;
1112 }
1113 
1114 inline
1116 {
1118  return *m_string;
1119 }
1120 
1121 inline
1122 bool CSeqdesc_Base::IsUser(void) const
1123 {
1124  return m_choice == e_User;
1125 }
1126 
1127 inline
1128 bool CSeqdesc_Base::IsSp(void) const
1129 {
1130  return m_choice == e_Sp;
1131 }
1132 
1133 inline
1134 bool CSeqdesc_Base::IsDbxref(void) const
1135 {
1136  return m_choice == e_Dbxref;
1137 }
1138 
1139 inline
1140 bool CSeqdesc_Base::IsEmbl(void) const
1141 {
1142  return m_choice == e_Embl;
1143 }
1144 
1145 inline
1147 {
1148  return m_choice == e_Create_date;
1149 }
1150 
1151 inline
1153 {
1154  return m_choice == e_Update_date;
1155 }
1156 
1157 inline
1158 bool CSeqdesc_Base::IsPrf(void) const
1159 {
1160  return m_choice == e_Prf;
1161 }
1162 
1163 inline
1164 bool CSeqdesc_Base::IsPdb(void) const
1165 {
1166  return m_choice == e_Pdb;
1167 }
1168 
1169 inline
1170 bool CSeqdesc_Base::IsHet(void) const
1171 {
1172  return m_choice == e_Het;
1173 }
1174 
1175 inline
1177 {
1179  return *m_Het;
1180 }
1181 
1182 inline
1184 {
1186  return *m_Het;
1187 }
1188 
1189 inline
1190 bool CSeqdesc_Base::IsSource(void) const
1191 {
1192  return m_choice == e_Source;
1193 }
1194 
1195 inline
1197 {
1198  return m_choice == e_Molinfo;
1199 }
1200 
1201 inline
1203 {
1204  return m_choice == e_Modelev;
1205 }
1206 
1207 ///////////////////////////////////////////////////////////
1208 ////////////////// end of inline methods //////////////////
1209 ///////////////////////////////////////////////////////////
1210 
1211 
1212 
1213 
1214 
1215 END_objects_SCOPE // namespace ncbi::objects::
1216 
1218 
1219 
1220 #endif // OBJECTS_SEQ_SEQDESC_BASE_HPP
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Definition: Date.hpp:53
Definition: Dbtag.hpp:53
CEMBL_block –.
Definition: EMBL_block.hpp:66
CHeterogen –.
Definition: Heterogen.hpp:66
CModelEvidenceSupport –.
CNumbering –.
Definition: Numbering.hpp:66
CPDB_block –.
Definition: PDB_block.hpp:66
CPIR_block –.
Definition: PIR_block.hpp:66
CPRF_block –.
Definition: PRF_block.hpp:66
@Pubdesc.hpp User-defined methods of the data storage class.
Definition: Pubdesc.hpp:54
CSP_block –.
Definition: SP_block.hpp:66
CSeqdesc_Base –.
Definition: Seqdesc_.hpp:96
Base class for all serializable objects.
Definition: serialbase.hpp:150
EResetVariant
Definition: serialbase.hpp:76
@ eDoResetVariant
Definition: serialbase.hpp:77
@ eDoNotResetVariant
Definition: serialbase.hpp:78
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
Definition: seqtitle.cpp:106
#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_SEQ_EXPORT
Definition: ncbi_export.h:825
NCBI_NS_NCBI::CSerialObject * m_object
Definition: Seqdesc_.hpp:889
TModif & SetModif(void)
Select the variant.
Definition: Seqdesc_.hpp:972
CSeqdesc_Base & operator=(const CSeqdesc_Base &)
bool IsGenbank(void) const
Check if variant Genbank is selected.
Definition: Seqdesc_.hpp:1090
CSeqdesc_Base(const CSeqdesc_Base &)
TMethod m_Method
Definition: Seqdesc_.hpp:886
string TRegion
Definition: Seqdesc_.hpp:202
EGIBB_method TMethod
Definition: Seqdesc_.hpp:192
bool IsDbxref(void) const
Check if variant Dbxref is selected.
Definition: Seqdesc_.hpp:1134
EGIBB_method
sequencing methods
const THet & GetHet(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1176
TMethod & SetMethod(void)
Select the variant.
Definition: Seqdesc_.hpp:992
bool IsModelev(void) const
Check if variant Modelev is selected.
Definition: Seqdesc_.hpp:1202
CDbtag TMaploc
Definition: Seqdesc_.hpp:198
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
THet & SetHet(void)
Select the variant.
Definition: Seqdesc_.hpp:1183
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
Definition: Seqdesc_.cpp:111
DECLARE_INTERNAL_TYPE_INFO()
bool IsEmbl(void) const
Check if variant Embl is selected.
Definition: Seqdesc_.hpp:1140
bool IsMolinfo(void) const
Check if variant Molinfo is selected.
Definition: Seqdesc_.hpp:1196
CGB_block TGenbank
Definition: Seqdesc_.hpp:200
bool IsMaploc(void) const
Check if variant Maploc is selected.
Definition: Seqdesc_.hpp:1078
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
Definition: Seqdesc_.hpp:138
TTitle & SetTitle(void)
Select the variant.
Definition: Seqdesc_.hpp:1039
bool IsHet(void) const
Check if variant Het is selected.
Definition: Seqdesc_.hpp:1170
TMol_type & SetMol_type(void)
Select the variant.
Definition: Seqdesc_.hpp:945
CPRF_block TPrf
Definition: Seqdesc_.hpp:209
CDate TCreate_date
Definition: Seqdesc_.hpp:207
bool IsOrg(void) const
Check if variant Org is selected.
Definition: Seqdesc_.hpp:1046
bool IsUpdate_date(void) const
Check if variant Update_date is selected.
Definition: Seqdesc_.hpp:1152
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
Definition: Seqdesc_.hpp:909
CUser_object TUser
Definition: Seqdesc_.hpp:203
TMol_type m_Mol_type
Definition: Seqdesc_.hpp:884
NCBI_NS_NCBI::CUnionBuffer< TModif > m_Modif
Definition: Seqdesc_.hpp:885
bool IsComment(void) const
Check if variant Comment is selected.
Definition: Seqdesc_.hpp:1052
EGIBB_mol TMol_type
Definition: Seqdesc_.hpp:190
const TTitle & GetTitle(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1032
bool IsSource(void) const
Check if variant Source is selected.
Definition: Seqdesc_.hpp:1190
bool IsMol_type(void) const
Check if variant Mol_type is selected.
Definition: Seqdesc_.hpp:932
CDate TUpdate_date
Definition: Seqdesc_.hpp:208
TMethod GetMethod(void) const
Get the variant data.
Definition: Seqdesc_.hpp:985
CModelEvidenceSupport TModelev
Definition: Seqdesc_.hpp:214
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
Definition: Seqdesc_.hpp:888
NCBI_NS_NCBI::CUnionBuffer< TModif > m_Modif
Definition: Seqdesc_.hpp:885
bool IsModif(void) const
Check if variant Modif is selected.
Definition: Seqdesc_.hpp:959
CPIR_block TPir
Definition: Seqdesc_.hpp:199
bool IsMethod(void) const
Check if variant Method is selected.
Definition: Seqdesc_.hpp:979
NCBI_NS_NCBI::CUnionBuffer< THet > m_Het
Definition: Seqdesc_.hpp:887
CBioSource TSource
Definition: Seqdesc_.hpp:212
bool IsCreate_date(void) const
Check if variant Create_date is selected.
Definition: Seqdesc_.hpp:1146
CHeterogen THet
Definition: Seqdesc_.hpp:211
TName & SetName(void)
Select the variant.
Definition: Seqdesc_.hpp:1019
CSerialObject Tparent
Definition: Seqdesc_.hpp:97
CPDB_block TPdb
Definition: Seqdesc_.hpp:210
CSP_block TSp
Definition: Seqdesc_.hpp:204
string TComment
Definition: Seqdesc_.hpp:196
list< EGIBB_mod > TModif
Definition: Seqdesc_.hpp:191
bool IsPrf(void) const
Check if variant Prf is selected.
Definition: Seqdesc_.hpp:1158
bool IsName(void) const
Check if variant Name is selected.
Definition: Seqdesc_.hpp:1006
string TName
Definition: Seqdesc_.hpp:193
TComment & SetComment(void)
Select the variant.
Definition: Seqdesc_.hpp:1065
CDbtag TDbxref
Definition: Seqdesc_.hpp:205
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool IsPir(void) const
Check if variant Pir is selected.
Definition: Seqdesc_.hpp:1084
E_Choice
Choice variants.
Definition: Seqdesc_.hpp:109
TMol_type GetMol_type(void) const
Get the variant data.
Definition: Seqdesc_.hpp:938
CNumbering TNum
Definition: Seqdesc_.hpp:197
bool IsPub(void) const
Check if variant Pub is selected.
Definition: Seqdesc_.hpp:1096
const TModif & GetModif(void) const
Get the variant data.
Definition: Seqdesc_.hpp:965
NCBI_NS_NCBI::CUnionBuffer< THet > m_Het
Definition: Seqdesc_.hpp:887
CMolInfo TMolinfo
Definition: Seqdesc_.hpp:213
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seqdesc_.hpp:903
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
Definition: Seqdesc_.cpp:223
E_Choice m_choice
Definition: Seqdesc_.hpp:877
bool IsTitle(void) const
Check if variant Title is selected.
Definition: Seqdesc_.hpp:1026
CEMBL_block TEmbl
Definition: Seqdesc_.hpp:206
string TTitle
Definition: Seqdesc_.hpp:194
bool IsNum(void) const
Check if variant Num is selected.
Definition: Seqdesc_.hpp:1072
EGIBB_mol
type of molecule represented
Definition: GIBB_mol_.hpp:64
bool IsSp(void) const
Check if variant Sp is selected.
Definition: Seqdesc_.hpp:1128
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
Definition: Seqdesc_.cpp:71
const TComment & GetComment(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1058
bool IsRegion(void) const
Check if variant Region is selected.
Definition: Seqdesc_.hpp:1102
const TName & GetName(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1012
CPubdesc TPub
Definition: Seqdesc_.hpp:201
const TRegion & GetRegion(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1108
TMol_type m_Mol_type
Definition: Seqdesc_.hpp:884
bool IsUser(void) const
Check if variant User is selected.
Definition: Seqdesc_.hpp:1122
TRegion & SetRegion(void)
Select the variant.
Definition: Seqdesc_.hpp:1115
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
Definition: Seqdesc_.hpp:888
bool IsPdb(void) const
Check if variant Pdb is selected.
Definition: Seqdesc_.hpp:1164
COrg_ref TOrg
Definition: Seqdesc_.hpp:195
@ e_Embl
EMBL specific information.
Definition: Seqdesc_.hpp:127
@ e_Het
cofactor, etc associated but not bound
Definition: Seqdesc_.hpp:132
@ e_Org
if all from one organism
Definition: Seqdesc_.hpp:116
@ e_Num
a numbering system
Definition: Seqdesc_.hpp:118
@ e_User
user defined object
Definition: Seqdesc_.hpp:124
@ e_Update_date
date of last update
Definition: Seqdesc_.hpp:129
@ e_Pub
a reference to the publication
Definition: Seqdesc_.hpp:122
@ e_Pir
PIR specific info.
Definition: Seqdesc_.hpp:120
@ e_Genbank
GenBank specific info.
Definition: Seqdesc_.hpp:121
@ e_Prf
PRF specific information.
Definition: Seqdesc_.hpp:130
@ e_Mol_type
type of molecule
Definition: Seqdesc_.hpp:111
@ e_Sp
SWISSPROT specific info.
Definition: Seqdesc_.hpp:125
@ e_Dbxref
xref to other databases
Definition: Seqdesc_.hpp:126
@ e_Comment
a more extensive comment
Definition: Seqdesc_.hpp:117
@ e_Method
sequencing method
Definition: Seqdesc_.hpp:113
@ e_Modelev
model evidence for XM records
Definition: Seqdesc_.hpp:135
@ e_Region
overall region (globin locus)
Definition: Seqdesc_.hpp:123
@ e_Molinfo
info on the molecule and techniques
Definition: Seqdesc_.hpp:134
@ e_Modif
modifiers
Definition: Seqdesc_.hpp:112
@ e_Maploc
map location of this sequence
Definition: Seqdesc_.hpp:119
@ e_Create_date
date entry first created/released
Definition: Seqdesc_.hpp:128
@ e_Title
a title for this sequence
Definition: Seqdesc_.hpp:115
@ e_Pdb
PDB specific information.
Definition: Seqdesc_.hpp:131
@ e_not_set
No variant selected.
Definition: Seqdesc_.hpp:110
@ e_Name
a name for this sequence
Definition: Seqdesc_.hpp:114
@ e_Source
source of materials, includes Org-ref
Definition: Seqdesc_.hpp:133
@ e_not_set
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
void SetDbxref(objects::CBioSource &src, string db, objects::CObject_id::TId id)
static void SetTitle(CRef< CSeq_entry > entry, string title)
Modified on Fri Sep 20 14:57:43 2024 by modify_doxy.py rev. 669887