NCBI C++ ToolKit
PC_XRefData_.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 PC_XRefData_.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/pcsubstance/pcsubstance.asn">pcsubstance.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/pcsubstance/pcsubstance.def">pcsubstance.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_PCSUBSTANCE_PC_XREFDATA_BASE_HPP
42 #define OBJECTS_PCSUBSTANCE_PC_XREFDATA_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
49 
51 
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
55 #endif
56 BEGIN_objects_SCOPE // namespace ncbi::objects::
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_PCSubstance
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 /// Depositor Provided X-Ref and LinkOut data for Entrez
69 ///
70 /// CPC_XRefData_Base --
71 ///
72 
74 {
76 public:
77  // constructor
78  CPC_XRefData_Base(void);
79  // destructor
80  virtual ~CPC_XRefData_Base(void);
81 
82  // type info
84 
85 
86  /// Choice variants.
87  enum E_Choice {
88  e_not_set = 0, ///< No variant selected
89  e_Regid, ///< External Database Registry ID
90  e_Rn, ///< Registry Number (e.g., EC Number, CAS Number)
91  e_Mesh, ///< MESH Index Term
92  e_Pmid, ///< PubMed ID Note: Must be greater than "0" or, if invalid, "0"
93  e_Gi, ///< GenBank General ID Note: Please use protein-gi or nucleotide-gi, if possible Note: Must be greater than "0" or, if invalid, "0"
94  e_Mmdb, ///< MMDB ID Note: Must be greater than "0" or, if invalid, "0"
95  e_Sid, ///< PubChem Substance ID Note: Must be greater than "0" or, if invalid, "0"
96  e_Cid, ///< PubChem Compound ID Note: Must be greater than "0" or, if invalid, "0"
97  e_Dburl, ///< Depositor Source Database Homepage
98  e_Sburl, ///< Depositor Homepage for a Substance
99  e_Asurl, ///< Depositor Homepage for an Assay
100  e_Protein_gi, ///< GenBank General ID for a Protein Note: Must be greater than "0" or, if invalid, "0"
101  e_Nucleotide_gi, ///< GenBank General ID for a Nucleotide Note: Must be greater than "0" or, if invalid, "0"
102  e_Taxonomy, ///< Taxonomy ID for an Organism Note: Must be greater than "0" or, if invalid, "0"
103  e_Aid, ///< PubChem BioAssay ID Note: Must be greater than "0" or, if invalid, "0"
104  e_Mim, ///< MIM, Mendelian Inheritance in Man, Number Note: Must be greater than "0" or, if invalid, "0"
105  e_Gene, ///< Entrez Gene ID Note: Must be greater than "0" or, if invalid, "0"
106  e_Probe, ///< Probe ID Note: Must be greater than "0" or, if invalid, "0"
107  e_Biosystem, ///< BioSystem ID Note: Must be greater than "0" or, if invalid, "0"
108  e_Geogse, ///< Gene Expression Omnibus Series Accession (GEO GSE) ID Note: Must be greater than "0" or, if invalid, "0"
109  e_Geogsm, ///< Gene Expression Omnibus Sample Accession (GEO GSM) ID Note: Must be greater than "0" or, if invalid, "0"
110  e_Patent, ///< Patent Identifier (e.g., USPTO, EPO, WPO, JPO, CPO)
111  e_Protein_accession, ///< GenBank Accession for a Protein
112  e_Nucleotide_accession, ///< GenBank Accession for a Nucleotide
113  e_Doi, ///< digital object identifier (DOI)
114  e_Citation ///< citation when PMID or DOI are not available
115  };
116  /// Maximum+1 value of the choice variant enumerator.
118  e_MaxChoice = 27 ///< == e_Citation+1
119  };
120 
121  /// Reset the whole object
122  virtual void Reset(void);
123 
124  /// Reset the selection (set it to e_not_set).
125  virtual void ResetSelection(void);
126 
127  /// Which variant is currently selected.
128  ///
129  /// @return
130  /// Choice state enumerator.
131  E_Choice Which(void) const;
132 
133  /// Verify selection, throw exception if it differs from the expected.
134  ///
135  /// @param index
136  /// Expected selection.
137  void CheckSelected(E_Choice index) const;
138 
139  /// Throw 'InvalidSelection' exception.
140  ///
141  /// @param index
142  /// Expected selection.
143  NCBI_NORETURN void ThrowInvalidSelection(E_Choice index) const;
144 
145  /// Retrieve selection name (for diagnostic purposes).
146  ///
147  /// @param index
148  /// One of possible selection states.
149  /// @return
150  /// Name string.
151  static string SelectionName(E_Choice index);
152 
153  /// Select the requested variant if needed.
154  ///
155  /// @param index
156  /// New selection state.
157  /// @param reset
158  /// Flag that defines the resetting of the variant data. The data will
159  /// be reset if either the current selection differs from the new one,
160  /// or the flag is set to eDoResetVariant.
162  /// Select the requested variant if needed,
163  /// allocating CObject variants from memory pool.
164  void Select(E_Choice index,
165  EResetVariant reset,
166  CObjectMemoryPool* pool);
167 
168  // types
169  typedef string TRegid;
170  typedef string TRn;
171  typedef string TMesh;
172  typedef int TPmid;
173  typedef int TGi;
174  typedef int TMmdb;
175  typedef int TSid;
176  typedef int TCid;
177  typedef string TDburl;
178  typedef string TSburl;
179  typedef string TAsurl;
180  typedef int TProtein_gi;
181  typedef int TNucleotide_gi;
182  typedef int TTaxonomy;
183  typedef int TAid;
184  typedef int TMim;
185  typedef int TGene;
186  typedef int TProbe;
187  typedef int TBiosystem;
188  typedef int TGeogse;
189  typedef int TGeogsm;
190  typedef string TPatent;
191  typedef string TProtein_accession;
192  typedef string TNucleotide_accession;
193  typedef string TDoi;
194  typedef string TCitation;
195 
196  // getters
197  // setters
198 
199 
200  /// Check if variant Regid is selected.
201  ///
202  /// Regid type is defined as 'typedef string TRegid'.
203  /// @return
204  /// - true, if the variant is selected.
205  /// - false, otherwise.
206  bool IsRegid(void) const;
207 
208  /// Get the variant data.
209  ///
210  /// @return
211  /// Reference to the data.
212  const TRegid& GetRegid(void) const;
213 
214  /// Select the variant.
215  ///
216  /// @return
217  /// Reference to the variant data.
218  TRegid& SetRegid(void);
219 
220  /// Select the variant and set its data.
221  ///
222  /// @param value
223  /// Variant data.
224  void SetRegid(const TRegid& value);
225 
226 
227  /// Check if variant Rn is selected.
228  ///
229  /// Rn type is defined as 'typedef string TRn'.
230  /// @return
231  /// - true, if the variant is selected.
232  /// - false, otherwise.
233  bool IsRn(void) const;
234 
235  /// Get the variant data.
236  ///
237  /// @return
238  /// Reference to the data.
239  const TRn& GetRn(void) const;
240 
241  /// Select the variant.
242  ///
243  /// @return
244  /// Reference to the variant data.
245  TRn& SetRn(void);
246 
247  /// Select the variant and set its data.
248  ///
249  /// @param value
250  /// Variant data.
251  void SetRn(const TRn& value);
252 
253 
254  /// Check if variant Mesh is selected.
255  ///
256  /// Mesh type is defined as 'typedef string TMesh'.
257  /// @return
258  /// - true, if the variant is selected.
259  /// - false, otherwise.
260  bool IsMesh(void) const;
261 
262  /// Get the variant data.
263  ///
264  /// @return
265  /// Reference to the data.
266  const TMesh& GetMesh(void) const;
267 
268  /// Select the variant.
269  ///
270  /// @return
271  /// Reference to the variant data.
272  TMesh& SetMesh(void);
273 
274  /// Select the variant and set its data.
275  ///
276  /// @param value
277  /// Variant data.
278  void SetMesh(const TMesh& value);
279 
280 
281  /// Check if variant Pmid is selected.
282  ///
283  /// Pmid type is defined as 'typedef int TPmid'.
284  /// @return
285  /// - true, if the variant is selected.
286  /// - false, otherwise.
287  bool IsPmid(void) const;
288 
289  /// Get the variant data.
290  ///
291  /// @return
292  /// Copy of the variant data.
293  TPmid GetPmid(void) const;
294 
295  /// Select the variant.
296  ///
297  /// @return
298  /// Reference to the variant data.
299  TPmid& SetPmid(void);
300 
301  /// Select the variant and set its data.
302  ///
303  /// @param value
304  /// Variant data.
305  void SetPmid(TPmid value);
306 
307 
308  /// Check if variant Gi is selected.
309  ///
310  /// Gi type is defined as 'typedef int TGi'.
311  /// @return
312  /// - true, if the variant is selected.
313  /// - false, otherwise.
314  bool IsGi(void) const;
315 
316  /// Get the variant data.
317  ///
318  /// @return
319  /// Copy of the variant data.
320  TGi GetGi(void) const;
321 
322  /// Select the variant.
323  ///
324  /// @return
325  /// Reference to the variant data.
326  TGi& SetGi(void);
327 
328  /// Select the variant and set its data.
329  ///
330  /// @param value
331  /// Variant data.
332  void SetGi(TGi value);
333 
334 
335  /// Check if variant Mmdb is selected.
336  ///
337  /// Mmdb type is defined as 'typedef int TMmdb'.
338  /// @return
339  /// - true, if the variant is selected.
340  /// - false, otherwise.
341  bool IsMmdb(void) const;
342 
343  /// Get the variant data.
344  ///
345  /// @return
346  /// Copy of the variant data.
347  TMmdb GetMmdb(void) const;
348 
349  /// Select the variant.
350  ///
351  /// @return
352  /// Reference to the variant data.
353  TMmdb& SetMmdb(void);
354 
355  /// Select the variant and set its data.
356  ///
357  /// @param value
358  /// Variant data.
359  void SetMmdb(TMmdb value);
360 
361 
362  /// Check if variant Sid is selected.
363  ///
364  /// Sid type is defined as 'typedef int TSid'.
365  /// @return
366  /// - true, if the variant is selected.
367  /// - false, otherwise.
368  bool IsSid(void) const;
369 
370  /// Get the variant data.
371  ///
372  /// @return
373  /// Copy of the variant data.
374  TSid GetSid(void) const;
375 
376  /// Select the variant.
377  ///
378  /// @return
379  /// Reference to the variant data.
380  TSid& SetSid(void);
381 
382  /// Select the variant and set its data.
383  ///
384  /// @param value
385  /// Variant data.
386  void SetSid(TSid value);
387 
388 
389  /// Check if variant Cid is selected.
390  ///
391  /// Cid type is defined as 'typedef int TCid'.
392  /// @return
393  /// - true, if the variant is selected.
394  /// - false, otherwise.
395  bool IsCid(void) const;
396 
397  /// Get the variant data.
398  ///
399  /// @return
400  /// Copy of the variant data.
401  TCid GetCid(void) const;
402 
403  /// Select the variant.
404  ///
405  /// @return
406  /// Reference to the variant data.
407  TCid& SetCid(void);
408 
409  /// Select the variant and set its data.
410  ///
411  /// @param value
412  /// Variant data.
413  void SetCid(TCid value);
414 
415 
416  /// Check if variant Dburl is selected.
417  ///
418  /// Dburl type is defined as 'typedef string TDburl'.
419  /// @return
420  /// - true, if the variant is selected.
421  /// - false, otherwise.
422  bool IsDburl(void) const;
423 
424  /// Get the variant data.
425  ///
426  /// @return
427  /// Reference to the data.
428  const TDburl& GetDburl(void) const;
429 
430  /// Select the variant.
431  ///
432  /// @return
433  /// Reference to the variant data.
434  TDburl& SetDburl(void);
435 
436  /// Select the variant and set its data.
437  ///
438  /// @param value
439  /// Variant data.
440  void SetDburl(const TDburl& value);
441 
442 
443  /// Check if variant Sburl is selected.
444  ///
445  /// Sburl type is defined as 'typedef string TSburl'.
446  /// @return
447  /// - true, if the variant is selected.
448  /// - false, otherwise.
449  bool IsSburl(void) const;
450 
451  /// Get the variant data.
452  ///
453  /// @return
454  /// Reference to the data.
455  const TSburl& GetSburl(void) const;
456 
457  /// Select the variant.
458  ///
459  /// @return
460  /// Reference to the variant data.
461  TSburl& SetSburl(void);
462 
463  /// Select the variant and set its data.
464  ///
465  /// @param value
466  /// Variant data.
467  void SetSburl(const TSburl& value);
468 
469 
470  /// Check if variant Asurl is selected.
471  ///
472  /// Asurl type is defined as 'typedef string TAsurl'.
473  /// @return
474  /// - true, if the variant is selected.
475  /// - false, otherwise.
476  bool IsAsurl(void) const;
477 
478  /// Get the variant data.
479  ///
480  /// @return
481  /// Reference to the data.
482  const TAsurl& GetAsurl(void) const;
483 
484  /// Select the variant.
485  ///
486  /// @return
487  /// Reference to the variant data.
488  TAsurl& SetAsurl(void);
489 
490  /// Select the variant and set its data.
491  ///
492  /// @param value
493  /// Variant data.
494  void SetAsurl(const TAsurl& value);
495 
496 
497  /// Check if variant Protein_gi is selected.
498  ///
499  /// Protein_gi type is defined as 'typedef int TProtein_gi'.
500  /// @return
501  /// - true, if the variant is selected.
502  /// - false, otherwise.
503  bool IsProtein_gi(void) const;
504 
505  /// Get the variant data.
506  ///
507  /// @return
508  /// Copy of the variant data.
509  TProtein_gi GetProtein_gi(void) const;
510 
511  /// Select the variant.
512  ///
513  /// @return
514  /// Reference to the variant data.
515  TProtein_gi& SetProtein_gi(void);
516 
517  /// Select the variant and set its data.
518  ///
519  /// @param value
520  /// Variant data.
521  void SetProtein_gi(TProtein_gi value);
522 
523 
524  /// Check if variant Nucleotide_gi is selected.
525  ///
526  /// Nucleotide_gi type is defined as 'typedef int TNucleotide_gi'.
527  /// @return
528  /// - true, if the variant is selected.
529  /// - false, otherwise.
530  bool IsNucleotide_gi(void) const;
531 
532  /// Get the variant data.
533  ///
534  /// @return
535  /// Copy of the variant data.
536  TNucleotide_gi GetNucleotide_gi(void) const;
537 
538  /// Select the variant.
539  ///
540  /// @return
541  /// Reference to the variant data.
542  TNucleotide_gi& SetNucleotide_gi(void);
543 
544  /// Select the variant and set its data.
545  ///
546  /// @param value
547  /// Variant data.
548  void SetNucleotide_gi(TNucleotide_gi value);
549 
550 
551  /// Check if variant Taxonomy is selected.
552  ///
553  /// Taxonomy type is defined as 'typedef int TTaxonomy'.
554  /// @return
555  /// - true, if the variant is selected.
556  /// - false, otherwise.
557  bool IsTaxonomy(void) const;
558 
559  /// Get the variant data.
560  ///
561  /// @return
562  /// Copy of the variant data.
563  TTaxonomy GetTaxonomy(void) const;
564 
565  /// Select the variant.
566  ///
567  /// @return
568  /// Reference to the variant data.
569  TTaxonomy& SetTaxonomy(void);
570 
571  /// Select the variant and set its data.
572  ///
573  /// @param value
574  /// Variant data.
575  void SetTaxonomy(TTaxonomy value);
576 
577 
578  /// Check if variant Aid is selected.
579  ///
580  /// Aid type is defined as 'typedef int TAid'.
581  /// @return
582  /// - true, if the variant is selected.
583  /// - false, otherwise.
584  bool IsAid(void) const;
585 
586  /// Get the variant data.
587  ///
588  /// @return
589  /// Copy of the variant data.
590  TAid GetAid(void) const;
591 
592  /// Select the variant.
593  ///
594  /// @return
595  /// Reference to the variant data.
596  TAid& SetAid(void);
597 
598  /// Select the variant and set its data.
599  ///
600  /// @param value
601  /// Variant data.
602  void SetAid(TAid value);
603 
604 
605  /// Check if variant Mim is selected.
606  ///
607  /// Mim type is defined as 'typedef int TMim'.
608  /// @return
609  /// - true, if the variant is selected.
610  /// - false, otherwise.
611  bool IsMim(void) const;
612 
613  /// Get the variant data.
614  ///
615  /// @return
616  /// Copy of the variant data.
617  TMim GetMim(void) const;
618 
619  /// Select the variant.
620  ///
621  /// @return
622  /// Reference to the variant data.
623  TMim& SetMim(void);
624 
625  /// Select the variant and set its data.
626  ///
627  /// @param value
628  /// Variant data.
629  void SetMim(TMim value);
630 
631 
632  /// Check if variant Gene is selected.
633  ///
634  /// Gene type is defined as 'typedef int TGene'.
635  /// @return
636  /// - true, if the variant is selected.
637  /// - false, otherwise.
638  bool IsGene(void) const;
639 
640  /// Get the variant data.
641  ///
642  /// @return
643  /// Copy of the variant data.
644  TGene GetGene(void) const;
645 
646  /// Select the variant.
647  ///
648  /// @return
649  /// Reference to the variant data.
650  TGene& SetGene(void);
651 
652  /// Select the variant and set its data.
653  ///
654  /// @param value
655  /// Variant data.
656  void SetGene(TGene value);
657 
658 
659  /// Check if variant Probe is selected.
660  ///
661  /// Probe type is defined as 'typedef int TProbe'.
662  /// @return
663  /// - true, if the variant is selected.
664  /// - false, otherwise.
665  bool IsProbe(void) const;
666 
667  /// Get the variant data.
668  ///
669  /// @return
670  /// Copy of the variant data.
671  TProbe GetProbe(void) const;
672 
673  /// Select the variant.
674  ///
675  /// @return
676  /// Reference to the variant data.
677  TProbe& SetProbe(void);
678 
679  /// Select the variant and set its data.
680  ///
681  /// @param value
682  /// Variant data.
683  void SetProbe(TProbe value);
684 
685 
686  /// Check if variant Biosystem is selected.
687  ///
688  /// Biosystem type is defined as 'typedef int TBiosystem'.
689  /// @return
690  /// - true, if the variant is selected.
691  /// - false, otherwise.
692  bool IsBiosystem(void) const;
693 
694  /// Get the variant data.
695  ///
696  /// @return
697  /// Copy of the variant data.
698  TBiosystem GetBiosystem(void) const;
699 
700  /// Select the variant.
701  ///
702  /// @return
703  /// Reference to the variant data.
704  TBiosystem& SetBiosystem(void);
705 
706  /// Select the variant and set its data.
707  ///
708  /// @param value
709  /// Variant data.
710  void SetBiosystem(TBiosystem value);
711 
712 
713  /// Check if variant Geogse is selected.
714  ///
715  /// Geogse type is defined as 'typedef int TGeogse'.
716  /// @return
717  /// - true, if the variant is selected.
718  /// - false, otherwise.
719  bool IsGeogse(void) const;
720 
721  /// Get the variant data.
722  ///
723  /// @return
724  /// Copy of the variant data.
725  TGeogse GetGeogse(void) const;
726 
727  /// Select the variant.
728  ///
729  /// @return
730  /// Reference to the variant data.
731  TGeogse& SetGeogse(void);
732 
733  /// Select the variant and set its data.
734  ///
735  /// @param value
736  /// Variant data.
737  void SetGeogse(TGeogse value);
738 
739 
740  /// Check if variant Geogsm is selected.
741  ///
742  /// Geogsm type is defined as 'typedef int TGeogsm'.
743  /// @return
744  /// - true, if the variant is selected.
745  /// - false, otherwise.
746  bool IsGeogsm(void) const;
747 
748  /// Get the variant data.
749  ///
750  /// @return
751  /// Copy of the variant data.
752  TGeogsm GetGeogsm(void) const;
753 
754  /// Select the variant.
755  ///
756  /// @return
757  /// Reference to the variant data.
758  TGeogsm& SetGeogsm(void);
759 
760  /// Select the variant and set its data.
761  ///
762  /// @param value
763  /// Variant data.
764  void SetGeogsm(TGeogsm value);
765 
766 
767  /// Check if variant Patent is selected.
768  ///
769  /// Patent type is defined as 'typedef string TPatent'.
770  /// @return
771  /// - true, if the variant is selected.
772  /// - false, otherwise.
773  bool IsPatent(void) const;
774 
775  /// Get the variant data.
776  ///
777  /// @return
778  /// Reference to the data.
779  const TPatent& GetPatent(void) const;
780 
781  /// Select the variant.
782  ///
783  /// @return
784  /// Reference to the variant data.
785  TPatent& SetPatent(void);
786 
787  /// Select the variant and set its data.
788  ///
789  /// @param value
790  /// Variant data.
791  void SetPatent(const TPatent& value);
792 
793 
794  /// Check if variant Protein_accession is selected.
795  ///
796  /// Protein_accession type is defined as 'typedef string TProtein_accession'.
797  /// @return
798  /// - true, if the variant is selected.
799  /// - false, otherwise.
800  bool IsProtein_accession(void) const;
801 
802  /// Get the variant data.
803  ///
804  /// @return
805  /// Reference to the data.
806  const TProtein_accession& GetProtein_accession(void) const;
807 
808  /// Select the variant.
809  ///
810  /// @return
811  /// Reference to the variant data.
812  TProtein_accession& SetProtein_accession(void);
813 
814  /// Select the variant and set its data.
815  ///
816  /// @param value
817  /// Variant data.
818  void SetProtein_accession(const TProtein_accession& value);
819 
820 
821  /// Check if variant Nucleotide_accession is selected.
822  ///
823  /// Nucleotide_accession type is defined as 'typedef string TNucleotide_accession'.
824  /// @return
825  /// - true, if the variant is selected.
826  /// - false, otherwise.
827  bool IsNucleotide_accession(void) const;
828 
829  /// Get the variant data.
830  ///
831  /// @return
832  /// Reference to the data.
833  const TNucleotide_accession& GetNucleotide_accession(void) const;
834 
835  /// Select the variant.
836  ///
837  /// @return
838  /// Reference to the variant data.
839  TNucleotide_accession& SetNucleotide_accession(void);
840 
841  /// Select the variant and set its data.
842  ///
843  /// @param value
844  /// Variant data.
845  void SetNucleotide_accession(const TNucleotide_accession& value);
846 
847 
848  /// Check if variant Doi is selected.
849  ///
850  /// Doi type is defined as 'typedef string TDoi'.
851  /// @return
852  /// - true, if the variant is selected.
853  /// - false, otherwise.
854  bool IsDoi(void) const;
855 
856  /// Get the variant data.
857  ///
858  /// @return
859  /// Reference to the data.
860  const TDoi& GetDoi(void) const;
861 
862  /// Select the variant.
863  ///
864  /// @return
865  /// Reference to the variant data.
866  TDoi& SetDoi(void);
867 
868  /// Select the variant and set its data.
869  ///
870  /// @param value
871  /// Variant data.
872  void SetDoi(const TDoi& value);
873 
874 
875  /// Check if variant Citation is selected.
876  ///
877  /// Citation type is defined as 'typedef string TCitation'.
878  /// @return
879  /// - true, if the variant is selected.
880  /// - false, otherwise.
881  bool IsCitation(void) const;
882 
883  /// Get the variant data.
884  ///
885  /// @return
886  /// Reference to the data.
887  const TCitation& GetCitation(void) const;
888 
889  /// Select the variant.
890  ///
891  /// @return
892  /// Reference to the variant data.
893  TCitation& SetCitation(void);
894 
895  /// Select the variant and set its data.
896  ///
897  /// @param value
898  /// Variant data.
899  void SetCitation(const TCitation& value);
900 
901 
902 private:
903  // copy constructor and assignment operator
906  // choice state
908  // helper methods
909  void DoSelect(E_Choice index, CObjectMemoryPool* pool = 0);
910 
911  static const char* const sm_SelectionNames[];
912  // data
913  union {
929  NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string> m_string;
931  };
932 };
933 
934 /* @} */
935 
936 
937 
938 
939 
940 ///////////////////////////////////////////////////////////
941 ///////////////////// inline methods //////////////////////
942 ///////////////////////////////////////////////////////////
943 inline
945 {
946  return m_choice;
947 }
948 
949 inline
951 {
952  if ( m_choice != index )
953  ThrowInvalidSelection(index);
954 }
955 
956 inline
957 void CPC_XRefData_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset, NCBI_NS_NCBI::CObjectMemoryPool* pool)
958 {
959  if ( reset == NCBI_NS_NCBI::eDoResetVariant || m_choice != index ) {
960  if ( m_choice != e_not_set )
961  ResetSelection();
962  DoSelect(index, pool);
963  }
964 }
965 
966 inline
967 void CPC_XRefData_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset)
968 {
969  Select(index, reset, 0);
970 }
971 
972 inline
974 {
975  return m_choice == e_Regid;
976 }
977 
978 inline
980 {
982  return *m_string;
983 }
984 
985 inline
987 {
989  return *m_string;
990 }
991 
992 inline
993 bool CPC_XRefData_Base::IsRn(void) const
994 {
995  return m_choice == e_Rn;
996 }
997 
998 inline
1000 {
1002  return *m_string;
1003 }
1004 
1005 inline
1007 {
1009  return *m_string;
1010 }
1011 
1012 inline
1014 {
1015  return m_choice == e_Mesh;
1016 }
1017 
1018 inline
1020 {
1022  return *m_string;
1023 }
1024 
1025 inline
1027 {
1029  return *m_string;
1030 }
1031 
1032 inline
1034 {
1035  return m_choice == e_Pmid;
1036 }
1037 
1038 inline
1040 {
1042  return m_Pmid;
1043 }
1044 
1045 inline
1047 {
1049  return m_Pmid;
1050 }
1051 
1052 inline
1054 {
1056  m_Pmid = value;
1057 }
1058 
1059 inline
1060 bool CPC_XRefData_Base::IsGi(void) const
1061 {
1062  return m_choice == e_Gi;
1063 }
1064 
1065 inline
1067 {
1069  return m_Gi;
1070 }
1071 
1072 inline
1074 {
1076  return m_Gi;
1077 }
1078 
1079 inline
1081 {
1083  m_Gi = value;
1084 }
1085 
1086 inline
1088 {
1089  return m_choice == e_Mmdb;
1090 }
1091 
1092 inline
1094 {
1096  return m_Mmdb;
1097 }
1098 
1099 inline
1101 {
1103  return m_Mmdb;
1104 }
1105 
1106 inline
1108 {
1110  m_Mmdb = value;
1111 }
1112 
1113 inline
1115 {
1116  return m_choice == e_Sid;
1117 }
1118 
1119 inline
1121 {
1123  return m_Sid;
1124 }
1125 
1126 inline
1128 {
1130  return m_Sid;
1131 }
1132 
1133 inline
1135 {
1137  m_Sid = value;
1138 }
1139 
1140 inline
1142 {
1143  return m_choice == e_Cid;
1144 }
1145 
1146 inline
1148 {
1150  return m_Cid;
1151 }
1152 
1153 inline
1155 {
1157  return m_Cid;
1158 }
1159 
1160 inline
1162 {
1164  m_Cid = value;
1165 }
1166 
1167 inline
1169 {
1170  return m_choice == e_Dburl;
1171 }
1172 
1173 inline
1175 {
1177  return *m_string;
1178 }
1179 
1180 inline
1182 {
1184  return *m_string;
1185 }
1186 
1187 inline
1189 {
1190  return m_choice == e_Sburl;
1191 }
1192 
1193 inline
1195 {
1197  return *m_string;
1198 }
1199 
1200 inline
1202 {
1204  return *m_string;
1205 }
1206 
1207 inline
1209 {
1210  return m_choice == e_Asurl;
1211 }
1212 
1213 inline
1215 {
1217  return *m_string;
1218 }
1219 
1220 inline
1222 {
1224  return *m_string;
1225 }
1226 
1227 inline
1229 {
1230  return m_choice == e_Protein_gi;
1231 }
1232 
1233 inline
1235 {
1237  return m_Protein_gi;
1238 }
1239 
1240 inline
1242 {
1244  return m_Protein_gi;
1245 }
1246 
1247 inline
1249 {
1251  m_Protein_gi = value;
1252 }
1253 
1254 inline
1256 {
1257  return m_choice == e_Nucleotide_gi;
1258 }
1259 
1260 inline
1262 {
1264  return m_Nucleotide_gi;
1265 }
1266 
1267 inline
1269 {
1271  return m_Nucleotide_gi;
1272 }
1273 
1274 inline
1276 {
1279 }
1280 
1281 inline
1283 {
1284  return m_choice == e_Taxonomy;
1285 }
1286 
1287 inline
1289 {
1291  return m_Taxonomy;
1292 }
1293 
1294 inline
1296 {
1298  return m_Taxonomy;
1299 }
1300 
1301 inline
1303 {
1305  m_Taxonomy = value;
1306 }
1307 
1308 inline
1310 {
1311  return m_choice == e_Aid;
1312 }
1313 
1314 inline
1316 {
1318  return m_Aid;
1319 }
1320 
1321 inline
1323 {
1325  return m_Aid;
1326 }
1327 
1328 inline
1330 {
1332  m_Aid = value;
1333 }
1334 
1335 inline
1337 {
1338  return m_choice == e_Mim;
1339 }
1340 
1341 inline
1343 {
1345  return m_Mim;
1346 }
1347 
1348 inline
1350 {
1352  return m_Mim;
1353 }
1354 
1355 inline
1357 {
1359  m_Mim = value;
1360 }
1361 
1362 inline
1364 {
1365  return m_choice == e_Gene;
1366 }
1367 
1368 inline
1370 {
1372  return m_Gene;
1373 }
1374 
1375 inline
1377 {
1379  return m_Gene;
1380 }
1381 
1382 inline
1384 {
1386  m_Gene = value;
1387 }
1388 
1389 inline
1391 {
1392  return m_choice == e_Probe;
1393 }
1394 
1395 inline
1397 {
1399  return m_Probe;
1400 }
1401 
1402 inline
1404 {
1406  return m_Probe;
1407 }
1408 
1409 inline
1411 {
1413  m_Probe = value;
1414 }
1415 
1416 inline
1418 {
1419  return m_choice == e_Biosystem;
1420 }
1421 
1422 inline
1424 {
1426  return m_Biosystem;
1427 }
1428 
1429 inline
1431 {
1433  return m_Biosystem;
1434 }
1435 
1436 inline
1438 {
1440  m_Biosystem = value;
1441 }
1442 
1443 inline
1445 {
1446  return m_choice == e_Geogse;
1447 }
1448 
1449 inline
1451 {
1453  return m_Geogse;
1454 }
1455 
1456 inline
1458 {
1460  return m_Geogse;
1461 }
1462 
1463 inline
1465 {
1467  m_Geogse = value;
1468 }
1469 
1470 inline
1472 {
1473  return m_choice == e_Geogsm;
1474 }
1475 
1476 inline
1478 {
1480  return m_Geogsm;
1481 }
1482 
1483 inline
1485 {
1487  return m_Geogsm;
1488 }
1489 
1490 inline
1492 {
1494  m_Geogsm = value;
1495 }
1496 
1497 inline
1499 {
1500  return m_choice == e_Patent;
1501 }
1502 
1503 inline
1505 {
1507  return *m_string;
1508 }
1509 
1510 inline
1512 {
1514  return *m_string;
1515 }
1516 
1517 inline
1519 {
1520  return m_choice == e_Protein_accession;
1521 }
1522 
1523 inline
1525 {
1527  return *m_string;
1528 }
1529 
1530 inline
1532 {
1534  return *m_string;
1535 }
1536 
1537 inline
1539 {
1540  return m_choice == e_Nucleotide_accession;
1541 }
1542 
1543 inline
1545 {
1547  return *m_string;
1548 }
1549 
1550 inline
1552 {
1554  return *m_string;
1555 }
1556 
1557 inline
1559 {
1560  return m_choice == e_Doi;
1561 }
1562 
1563 inline
1565 {
1567  return *m_string;
1568 }
1569 
1570 inline
1572 {
1574  return *m_string;
1575 }
1576 
1577 inline
1579 {
1580  return m_choice == e_Citation;
1581 }
1582 
1583 inline
1585 {
1587  return *m_string;
1588 }
1589 
1590 inline
1592 {
1594  return *m_string;
1595 }
1596 
1597 ///////////////////////////////////////////////////////////
1598 ////////////////// end of inline methods //////////////////
1599 ///////////////////////////////////////////////////////////
1600 
1601 
1602 
1603 
1604 
1605 END_objects_SCOPE // namespace ncbi::objects::
1606 
1608 
1609 
1610 #endif // OBJECTS_PCSUBSTANCE_PC_XREFDATA_BASE_HPP
Depositor Provided X-Ref and LinkOut data for Entrez.
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
@ eDoNotResetVariant
Definition: serialbase.hpp:78
#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_PCSUBSTANCE_EXPORT
Definition: ncbi_export.h:688
TMim GetMim(void) const
Get the variant data.
bool IsRn(void) const
Check if variant Rn is selected.
TProtein_gi & SetProtein_gi(void)
Select the variant.
string TNucleotide_accession
bool IsMim(void) const
Check if variant Mim is selected.
TCid & SetCid(void)
Select the variant.
bool IsRegid(void) const
Check if variant Regid is selected.
const TProtein_accession & GetProtein_accession(void) const
Get the variant data.
TGeogse & SetGeogse(void)
Select the variant.
TNucleotide_gi & SetNucleotide_gi(void)
Select the variant.
TProtein_gi GetProtein_gi(void) const
Get the variant data.
TAid & SetAid(void)
Select the variant.
TNucleotide_gi m_Nucleotide_gi
bool IsNucleotide_gi(void) const
Check if variant Nucleotide_gi is selected.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
TNucleotide_gi m_Nucleotide_gi
TPmid & SetPmid(void)
Select the variant.
CPC_XRefData_Base & operator=(const CPC_XRefData_Base &)
TGi & SetGi(void)
Select the variant.
bool IsGeogsm(void) const
Check if variant Geogsm is selected.
TProbe & SetProbe(void)
Select the variant.
TGene GetGene(void) const
Get the variant data.
const TCitation & GetCitation(void) const
Get the variant data.
TRn & SetRn(void)
Select the variant.
bool IsProtein_accession(void) const
Check if variant Protein_accession is selected.
TPmid GetPmid(void) const
Get the variant data.
bool IsNucleotide_accession(void) const
Check if variant Nucleotide_accession is selected.
TRegid & SetRegid(void)
Select the variant.
bool IsAid(void) const
Check if variant Aid is selected.
TMesh & SetMesh(void)
Select the variant.
TMmdb & SetMmdb(void)
Select the variant.
bool IsMmdb(void) const
Check if variant Mmdb is selected.
bool IsSburl(void) const
Check if variant Sburl is selected.
TNucleotide_accession & SetNucleotide_accession(void)
Select the variant.
TNucleotide_gi GetNucleotide_gi(void) const
Get the variant data.
TPatent & SetPatent(void)
Select the variant.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
TDoi & SetDoi(void)
Select the variant.
TBiosystem & SetBiosystem(void)
Select the variant.
CSerialObject Tparent
bool IsDoi(void) const
Check if variant Doi is selected.
bool IsCid(void) const
Check if variant Cid is selected.
const TRegid & GetRegid(void) const
Get the variant data.
TCid GetCid(void) const
Get the variant data.
bool IsAsurl(void) const
Check if variant Asurl is selected.
TMim & SetMim(void)
Select the variant.
TTaxonomy & SetTaxonomy(void)
Select the variant.
TCitation & SetCitation(void)
Select the variant.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
const TMesh & GetMesh(void) const
Get the variant data.
const TNucleotide_accession & GetNucleotide_accession(void) const
Get the variant data.
TProbe GetProbe(void) const
Get the variant data.
const TRn & GetRn(void) const
Get the variant data.
TBiosystem GetBiosystem(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool IsCitation(void) const
Check if variant Citation is selected.
TGeogsm GetGeogsm(void) const
Get the variant data.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
TAid GetAid(void) const
Get the variant data.
TGi GetGi(void) const
Get the variant data.
const TDburl & GetDburl(void) const
Get the variant data.
bool IsPmid(void) const
Check if variant Pmid is selected.
bool IsGi(void) const
Check if variant Gi is selected.
bool IsTaxonomy(void) const
Check if variant Taxonomy is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TProtein_accession & SetProtein_accession(void)
Select the variant.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
TMmdb GetMmdb(void) const
Get the variant data.
bool IsBiosystem(void) const
Check if variant Biosystem is selected.
bool IsGene(void) const
Check if variant Gene is selected.
bool IsProbe(void) const
Check if variant Probe is selected.
bool IsDburl(void) const
Check if variant Dburl is selected.
TSid & SetSid(void)
Select the variant.
TSburl & SetSburl(void)
Select the variant.
CPC_XRefData_Base(const CPC_XRefData_Base &)
const TSburl & GetSburl(void) const
Get the variant data.
TDburl & SetDburl(void)
Select the variant.
const TDoi & GetDoi(void) const
Get the variant data.
TTaxonomy GetTaxonomy(void) const
Get the variant data.
TGeogsm & SetGeogsm(void)
Select the variant.
bool IsMesh(void) const
Check if variant Mesh is selected.
bool IsProtein_gi(void) const
Check if variant Protein_gi is selected.
bool IsSid(void) const
Check if variant Sid is selected.
TAsurl & SetAsurl(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
TBiosystem m_Biosystem
TGeogse GetGeogse(void) const
Get the variant data.
TGene & SetGene(void)
Select the variant.
TProtein_gi m_Protein_gi
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
E_Choice
Choice variants.
TSid GetSid(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
bool IsPatent(void) const
Check if variant Patent is selected.
const TPatent & GetPatent(void) const
Get the variant data.
bool IsGeogse(void) const
Check if variant Geogse is selected.
const TAsurl & GetAsurl(void) const
Get the variant data.
@ e_Protein_gi
GenBank General ID for a Protein Note: Must be greater than "0" or, if invalid, "0".
@ e_Protein_accession
GenBank Accession for a Protein.
@ e_Nucleotide_accession
GenBank Accession for a Nucleotide.
@ e_Cid
PubChem Compound ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Citation
citation when PMID or DOI are not available
@ e_Rn
Registry Number (e.g., EC Number, CAS Number)
@ e_Dburl
Depositor Source Database Homepage.
@ e_Nucleotide_gi
GenBank General ID for a Nucleotide Note: Must be greater than "0" or, if invalid,...
@ e_Geogsm
Gene Expression Omnibus Sample Accession (GEO GSM) ID Note: Must be greater than "0" or,...
@ e_Aid
PubChem BioAssay ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Doi
digital object identifier (DOI)
@ e_Gene
Entrez Gene ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Gi
GenBank General ID Note: Please use protein-gi or nucleotide-gi, if possible Note: Must be greater th...
@ e_Probe
Probe ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Biosystem
BioSystem ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Pmid
PubMed ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Mmdb
MMDB ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Mesh
MESH Index Term.
@ e_Regid
External Database Registry ID.
@ e_Sid
PubChem Substance ID Note: Must be greater than "0" or, if invalid, "0".
@ e_Asurl
Depositor Homepage for an Assay.
@ e_Mim
MIM, Mendelian Inheritance in Man, Number Note: Must be greater than "0" or, if invalid,...
@ e_Geogse
Gene Expression Omnibus Series Accession (GEO GSE) ID Note: Must be greater than "0" or,...
@ e_Sburl
Depositor Homepage for a Substance.
@ e_Taxonomy
Taxonomy ID for an Organism Note: Must be greater than "0" or, if invalid, "0".
@ e_not_set
No variant selected.
@ e_Patent
Patent Identifier (e.g., USPTO, EPO, WPO, JPO, CPO)
@ e_not_set
Modified on Sat Mar 02 10:53:28 2024 by modify_doxy.py rev. 669887