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

Go to the SVN repository for this file.

00001 /* $Id$
00002  * ===========================================================================
00003  *
00004  *                            PUBLIC DOMAIN NOTICE
00005  *               National Center for Biotechnology Information
00006  *
00007  *  This software/database is a "United States Government Work" under the
00008  *  terms of the United States Copyright Act.  It was written as part of
00009  *  the author's official duties as a United States Government employee and
00010  *  thus cannot be copyrighted.  This software/database is freely available
00011  *  to the public for use. The National Library of Medicine and the U.S.
00012  *  Government have not placed any restriction on its use or reproduction.
00013  *
00014  *  Although all reasonable efforts have been taken to ensure the accuracy
00015  *  and reliability of the software and data, the NLM and the U.S.
00016  *  Government do not and cannot warrant the performance or results that
00017  *  may be obtained by using this software or data. The NLM and the U.S.
00018  *  Government disclaim all warranties, express or implied, including
00019  *  warranties of performance, merchantability or fitness for any particular
00020  *  purpose.
00021  *
00022  *  Please cite the author in any work or product based on this material.
00023  *
00024  * ===========================================================================
00025  *
00026  */
00027 
00028 /// @file SeqFeatData_.hpp
00029 /// Data storage class.
00030 ///
00031 /// This file was generated by application DATATOOL
00032 /// using the following specifications:
00033 /// <a href="http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqfeat/seqfeat.asn">seqfeat.asn</a>
00034 /// and additional tune-up parameters:
00035 /// <a href="http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqfeat/seqfeat.def">seqfeat.def</a>
00036 ///
00037 /// ATTENTION:
00038 ///   Don't edit or commit this file into CVS as this file will
00039 ///   be overridden (by DATATOOL) without warning!
00040 
00041 #ifndef OBJECTS_SEQFEAT_SEQFEATDATA_BASE_HPP
00042 #define OBJECTS_SEQFEAT_SEQFEATDATA_BASE_HPP
00043 
00044 // standard includes
00045 #include <serial/serialbase.hpp>
00046 
00047 // generated includes
00048 #include <string>
00049 #include <objects/seq/Heterogen.hpp>
00050 
00051 BEGIN_NCBI_SCOPE
00052 
00053 #ifndef BEGIN_objects_SCOPE
00054 #  define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
00055 #  define END_objects_SCOPE END_SCOPE(objects)
00056 #endif
00057 BEGIN_objects_SCOPE // namespace ncbi::objects::
00058 
00059 
00060 // forward declarations
00061 class CBioSource;
00062 class CCdregion;
00063 class CClone_ref;
00064 class CGene_ref;
00065 class CImp_feat;
00066 class CNumbering;
00067 class COrg_ref;
00068 class CProt_ref;
00069 class CPubdesc;
00070 class CRNA_ref;
00071 class CRsite_ref;
00072 class CSeq_loc;
00073 class CTxinit;
00074 class CUser_object;
00075 class CVariation_ref;
00076 
00077 
00078 // generated classes
00079 
00080 
00081 /** @addtogroup dataspec_NCBI_Seqfeat
00082  *
00083  * @{
00084  */
00085 
00086 /////////////////////////////////////////////////////////////////////////////
00087 ///
00088 /// CSeqFeatData_Base --
00089 ///
00090 
00091 class NCBI_SEQFEAT_EXPORT CSeqFeatData_Base : public CSerialObject
00092 {
00093     typedef CSerialObject Tparent;
00094 public:
00095     // constructor
00096     CSeqFeatData_Base(void);
00097     // destructor
00098     virtual ~CSeqFeatData_Base(void);
00099 
00100     // type info
00101     DECLARE_INTERNAL_TYPE_INFO();
00102 
00103     enum EBond {
00104         eBond_disulfide  =   1,
00105         eBond_thiolester =   2,
00106         eBond_xlink      =   3,
00107         eBond_thioether  =   4,
00108         eBond_other      = 255
00109     };
00110     
00111     /// Access to EBond's attributes (values, names) as defined in spec
00112     static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EBond)(void);
00113     
00114     enum ESite {
00115         eSite_active                      =   1,
00116         eSite_binding                     =   2,
00117         eSite_cleavage                    =   3,
00118         eSite_inhibit                     =   4,
00119         eSite_modified                    =   5,
00120         eSite_glycosylation               =   6,
00121         eSite_myristoylation              =   7,
00122         eSite_mutagenized                 =   8,
00123         eSite_metal_binding               =   9,
00124         eSite_phosphorylation             =  10,
00125         eSite_acetylation                 =  11,
00126         eSite_amidation                   =  12,
00127         eSite_methylation                 =  13,
00128         eSite_hydroxylation               =  14,
00129         eSite_sulfatation                 =  15,
00130         eSite_oxidative_deamination       =  16,
00131         eSite_pyrrolidone_carboxylic_acid =  17,
00132         eSite_gamma_carboxyglutamic_acid  =  18,
00133         eSite_blocked                     =  19,
00134         eSite_lipid_binding               =  20,
00135         eSite_np_binding                  =  21,
00136         eSite_dna_binding                 =  22,
00137         eSite_signal_peptide              =  23,
00138         eSite_transit_peptide             =  24,
00139         eSite_transmembrane_region        =  25,
00140         eSite_nitrosylation               =  26,
00141         eSite_other                       = 255
00142     };
00143     
00144     /// Access to ESite's attributes (values, names) as defined in spec
00145     static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(ESite)(void);
00146     
00147     /// protein secondary structure
00148     enum EPsec_str {
00149         ePsec_str_helix = 1,  ///< any helix
00150         ePsec_str_sheet = 2,  ///< beta sheet
00151         ePsec_str_turn  = 3  ///< beta or gamma turn
00152     };
00153     
00154     /// Access to EPsec_str's attributes (values, names) as defined in spec
00155     static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EPsec_str)(void);
00156     
00157 
00158     /// Choice variants.
00159     enum E_Choice {
00160         e_not_set = 0,      ///< No variant selected
00161         e_Gene,
00162         e_Org,
00163         e_Cdregion,
00164         e_Prot,
00165         e_Rna,
00166         e_Pub,              ///< publication applies to this seq
00167         e_Seq,              ///< to annotate origin from another seq
00168         e_Imp,
00169         e_Region,           ///< named region (globin locus)
00170         e_Comment,          ///< just a comment
00171         e_Bond,
00172         e_Site,
00173         e_Rsite,            ///< restriction site  (for maps really)
00174         e_User,             ///< user defined structure
00175         e_Txinit,           ///< transcription initiation
00176         e_Num,              ///< a numbering system
00177         e_Psec_str,
00178         e_Non_std_residue,  ///< non-standard residue here in seq
00179         e_Het,              ///< cofactor, prosthetic grp, etc, bound to seq
00180         e_Biosrc,
00181         e_Clone,
00182         e_Variation
00183     };
00184     /// Maximum+1 value of the choice variant enumerator.
00185     enum E_ChoiceStopper {
00186         e_MaxChoice = 23 ///< == e_Variation+1
00187     };
00188 
00189     /// Reset the whole object
00190     virtual void Reset(void);
00191 
00192     /// Reset the selection (set it to e_not_set).
00193     virtual void ResetSelection(void);
00194 
00195     /// Which variant is currently selected.
00196     ///
00197     /// @return
00198     ///   Choice state enumerator.
00199     E_Choice Which(void) const;
00200 
00201     /// Verify selection, throw exception if it differs from the expected.
00202     ///
00203     /// @param index
00204     ///   Expected selection.
00205     void CheckSelected(E_Choice index) const;
00206 
00207     /// Throw 'InvalidSelection' exception.
00208     ///
00209     /// @param index
00210     ///   Expected selection.
00211     NCBI_NORETURN void ThrowInvalidSelection(E_Choice index) const;
00212 
00213     /// Retrieve selection name (for diagnostic purposes).
00214     ///
00215     /// @param index
00216     ///   One of possible selection states.
00217     /// @return
00218     ///   Name string.
00219     static string SelectionName(E_Choice index);
00220 
00221     /// Select the requested variant if needed.
00222     ///
00223     /// @param index
00224     ///   New selection state.
00225     /// @param reset
00226     ///   Flag that defines the resetting of the variant data. The data will
00227     ///   be reset if either the current selection differs from the new one,
00228     ///   or the flag is set to eDoResetVariant.
00229     void Select(E_Choice index, EResetVariant reset = eDoResetVariant);
00230     /// Select the requested variant if needed,
00231     /// allocating CObject variants from memory pool.
00232     void Select(E_Choice index,
00233                 EResetVariant reset,
00234                 CObjectMemoryPool* pool);
00235 
00236     // types
00237     typedef CGene_ref TGene;
00238     typedef COrg_ref TOrg;
00239     typedef CCdregion TCdregion;
00240     typedef CProt_ref TProt;
00241     typedef CRNA_ref TRna;
00242     typedef CPubdesc TPub;
00243     typedef CSeq_loc TSeq;
00244     typedef CImp_feat TImp;
00245     typedef string TRegion;
00246     typedef EBond TBond;
00247     typedef ESite TSite;
00248     typedef CRsite_ref TRsite;
00249     typedef CUser_object TUser;
00250     typedef CTxinit TTxinit;
00251     typedef CNumbering TNum;
00252     typedef EPsec_str TPsec_str;
00253     typedef string TNon_std_residue;
00254     typedef CHeterogen THet;
00255     typedef CBioSource TBiosrc;
00256     typedef CClone_ref TClone;
00257     typedef CVariation_ref TVariation;
00258 
00259     // getters
00260     // setters
00261 
00262 
00263     /// Check if variant Gene is selected.
00264     ///
00265     /// Gene type is defined as 'typedef CGene_ref TGene'.
00266     /// @return
00267     ///   - true, if the variant is selected.
00268     ///   - false, otherwise.
00269     bool IsGene(void) const;
00270 
00271     /// Get the variant data.
00272     ///
00273     /// @return
00274     ///   Reference to the data.
00275     const TGene& GetGene(void) const;
00276 
00277     /// Select the variant.
00278     ///
00279     /// @return
00280     ///   Reference to the variant data.
00281     TGene& SetGene(void);
00282     /// Select the variant and set its data.
00283     ///
00284     /// @param value
00285     ///   Reference to the data.
00286     void SetGene(TGene& value);
00287 
00288 
00289     /// Check if variant Org is selected.
00290     ///
00291     /// Org type is defined as 'typedef COrg_ref TOrg'.
00292     /// @return
00293     ///   - true, if the variant is selected.
00294     ///   - false, otherwise.
00295     bool IsOrg(void) const;
00296 
00297     /// Get the variant data.
00298     ///
00299     /// @return
00300     ///   Reference to the data.
00301     const TOrg& GetOrg(void) const;
00302 
00303     /// Select the variant.
00304     ///
00305     /// @return
00306     ///   Reference to the variant data.
00307     TOrg& SetOrg(void);
00308     /// Select the variant and set its data.
00309     ///
00310     /// @param value
00311     ///   Reference to the data.
00312     void SetOrg(TOrg& value);
00313 
00314 
00315     /// Check if variant Cdregion is selected.
00316     ///
00317     /// Cdregion type is defined as 'typedef CCdregion TCdregion'.
00318     /// @return
00319     ///   - true, if the variant is selected.
00320     ///   - false, otherwise.
00321     bool IsCdregion(void) const;
00322 
00323     /// Get the variant data.
00324     ///
00325     /// @return
00326     ///   Reference to the data.
00327     const TCdregion& GetCdregion(void) const;
00328 
00329     /// Select the variant.
00330     ///
00331     /// @return
00332     ///   Reference to the variant data.
00333     TCdregion& SetCdregion(void);
00334     /// Select the variant and set its data.
00335     ///
00336     /// @param value
00337     ///   Reference to the data.
00338     void SetCdregion(TCdregion& value);
00339 
00340 
00341     /// Check if variant Prot is selected.
00342     ///
00343     /// Prot type is defined as 'typedef CProt_ref TProt'.
00344     /// @return
00345     ///   - true, if the variant is selected.
00346     ///   - false, otherwise.
00347     bool IsProt(void) const;
00348 
00349     /// Get the variant data.
00350     ///
00351     /// @return
00352     ///   Reference to the data.
00353     const TProt& GetProt(void) const;
00354 
00355     /// Select the variant.
00356     ///
00357     /// @return
00358     ///   Reference to the variant data.
00359     TProt& SetProt(void);
00360     /// Select the variant and set its data.
00361     ///
00362     /// @param value
00363     ///   Reference to the data.
00364     void SetProt(TProt& value);
00365 
00366 
00367     /// Check if variant Rna is selected.
00368     ///
00369     /// Rna type is defined as 'typedef CRNA_ref TRna'.
00370     /// @return
00371     ///   - true, if the variant is selected.
00372     ///   - false, otherwise.
00373     bool IsRna(void) const;
00374 
00375     /// Get the variant data.
00376     ///
00377     /// @return
00378     ///   Reference to the data.
00379     const TRna& GetRna(void) const;
00380 
00381     /// Select the variant.
00382     ///
00383     /// @return
00384     ///   Reference to the variant data.
00385     TRna& SetRna(void);
00386     /// Select the variant and set its data.
00387     ///
00388     /// @param value
00389     ///   Reference to the data.
00390     void SetRna(TRna& value);
00391 
00392 
00393     /// Check if variant Pub is selected.
00394     ///
00395     /// Pub type is defined as 'typedef CPubdesc TPub'.
00396     /// @return
00397     ///   - true, if the variant is selected.
00398     ///   - false, otherwise.
00399     bool IsPub(void) const;
00400 
00401     /// Get the variant data.
00402     ///
00403     /// @return
00404     ///   Reference to the data.
00405     const TPub& GetPub(void) const;
00406 
00407     /// Select the variant.
00408     ///
00409     /// @return
00410     ///   Reference to the variant data.
00411     TPub& SetPub(void);
00412     /// Select the variant and set its data.
00413     ///
00414     /// @param value
00415     ///   Reference to the data.
00416     void SetPub(TPub& value);
00417 
00418 
00419     /// Check if variant Seq is selected.
00420     ///
00421     /// Seq type is defined as 'typedef CSeq_loc TSeq'.
00422     /// @return
00423     ///   - true, if the variant is selected.
00424     ///   - false, otherwise.
00425     bool IsSeq(void) const;
00426 
00427     /// Get the variant data.
00428     ///
00429     /// @return
00430     ///   Reference to the data.
00431     const TSeq& GetSeq(void) const;
00432 
00433     /// Select the variant.
00434     ///
00435     /// @return
00436     ///   Reference to the variant data.
00437     TSeq& SetSeq(void);
00438     /// Select the variant and set its data.
00439     ///
00440     /// @param value
00441     ///   Reference to the data.
00442     void SetSeq(TSeq& value);
00443 
00444 
00445     /// Check if variant Imp is selected.
00446     ///
00447     /// Imp type is defined as 'typedef CImp_feat TImp'.
00448     /// @return
00449     ///   - true, if the variant is selected.
00450     ///   - false, otherwise.
00451     bool IsImp(void) const;
00452 
00453     /// Get the variant data.
00454     ///
00455     /// @return
00456     ///   Reference to the data.
00457     const TImp& GetImp(void) const;
00458 
00459     /// Select the variant.
00460     ///
00461     /// @return
00462     ///   Reference to the variant data.
00463     TImp& SetImp(void);
00464     /// Select the variant and set its data.
00465     ///
00466     /// @param value
00467     ///   Reference to the data.
00468     void SetImp(TImp& value);
00469 
00470 
00471     /// Check if variant Region is selected.
00472     ///
00473     /// Region type is defined as 'typedef string TRegion'.
00474     /// @return
00475     ///   - true, if the variant is selected.
00476     ///   - false, otherwise.
00477     bool IsRegion(void) const;
00478 
00479     /// Get the variant data.
00480     ///
00481     /// @return
00482     ///   Reference to the data.
00483     const TRegion& GetRegion(void) const;
00484 
00485     /// Select the variant.
00486     ///
00487     /// @return
00488     ///   Reference to the variant data.
00489     TRegion& SetRegion(void);
00490 
00491     /// Select the variant and set its data.
00492     ///
00493     /// @param value
00494     ///   Variant data.
00495     void SetRegion(const TRegion& value);
00496 
00497 
00498     /// Check if variant Comment is selected.
00499     ///
00500     /// @return
00501     ///   - true, if the variant is selected.
00502     ///   - false, otherwise.
00503     bool IsComment(void) const;
00504 
00505     /// Select the variant.
00506     void SetComment(void);
00507 
00508 
00509     /// Check if variant Bond is selected.
00510     ///
00511     /// Bond type is defined as 'typedef EBond TBond'.
00512     /// @return
00513     ///   - true, if the variant is selected.
00514     ///   - false, otherwise.
00515     bool IsBond(void) const;
00516 
00517     /// Get the variant data.
00518     ///
00519     /// @return
00520     ///   Copy of the variant data.
00521     TBond GetBond(void) const;
00522 
00523     /// Select the variant.
00524     ///
00525     /// @return
00526     ///   Reference to the variant data.
00527     TBond& SetBond(void);
00528 
00529     /// Select the variant and set its data.
00530     ///
00531     /// @param value
00532     ///   Variant data.
00533     void SetBond(TBond value);
00534 
00535 
00536     /// Check if variant Site is selected.
00537     ///
00538     /// Site type is defined as 'typedef ESite TSite'.
00539     /// @return
00540     ///   - true, if the variant is selected.
00541     ///   - false, otherwise.
00542     bool IsSite(void) const;
00543 
00544     /// Get the variant data.
00545     ///
00546     /// @return
00547     ///   Copy of the variant data.
00548     TSite GetSite(void) const;
00549 
00550     /// Select the variant.
00551     ///
00552     /// @return
00553     ///   Reference to the variant data.
00554     TSite& SetSite(void);
00555 
00556     /// Select the variant and set its data.
00557     ///
00558     /// @param value
00559     ///   Variant data.
00560     void SetSite(TSite value);
00561 
00562 
00563     /// Check if variant Rsite is selected.
00564     ///
00565     /// Rsite type is defined as 'typedef CRsite_ref TRsite'.
00566     /// @return
00567     ///   - true, if the variant is selected.
00568     ///   - false, otherwise.
00569     bool IsRsite(void) const;
00570 
00571     /// Get the variant data.
00572     ///
00573     /// @return
00574     ///   Reference to the data.
00575     const TRsite& GetRsite(void) const;
00576 
00577     /// Select the variant.
00578     ///
00579     /// @return
00580     ///   Reference to the variant data.
00581     TRsite& SetRsite(void);
00582     /// Select the variant and set its data.
00583     ///
00584     /// @param value
00585     ///   Reference to the data.
00586     void SetRsite(TRsite& value);
00587 
00588 
00589     /// Check if variant User is selected.
00590     ///
00591     /// User type is defined as 'typedef CUser_object TUser'.
00592     /// @return
00593     ///   - true, if the variant is selected.
00594     ///   - false, otherwise.
00595     bool IsUser(void) const;
00596 
00597     /// Get the variant data.
00598     ///
00599     /// @return
00600     ///   Reference to the data.
00601     const TUser& GetUser(void) const;
00602 
00603     /// Select the variant.
00604     ///
00605     /// @return
00606     ///   Reference to the variant data.
00607     TUser& SetUser(void);
00608     /// Select the variant and set its data.
00609     ///
00610     /// @param value
00611     ///   Reference to the data.
00612     void SetUser(TUser& value);
00613 
00614 
00615     /// Check if variant Txinit is selected.
00616     ///
00617     /// Txinit type is defined as 'typedef CTxinit TTxinit'.
00618     /// @return
00619     ///   - true, if the variant is selected.
00620     ///   - false, otherwise.
00621     bool IsTxinit(void) const;
00622 
00623     /// Get the variant data.
00624     ///
00625     /// @return
00626     ///   Reference to the data.
00627     const TTxinit& GetTxinit(void) const;
00628 
00629     /// Select the variant.
00630     ///
00631     /// @return
00632     ///   Reference to the variant data.
00633     TTxinit& SetTxinit(void);
00634     /// Select the variant and set its data.
00635     ///
00636     /// @param value
00637     ///   Reference to the data.
00638     void SetTxinit(TTxinit& value);
00639 
00640 
00641     /// Check if variant Num is selected.
00642     ///
00643     /// Num type is defined as 'typedef CNumbering TNum'.
00644     /// @return
00645     ///   - true, if the variant is selected.
00646     ///   - false, otherwise.
00647     bool IsNum(void) const;
00648 
00649     /// Get the variant data.
00650     ///
00651     /// @return
00652     ///   Reference to the data.
00653     const TNum& GetNum(void) const;
00654 
00655     /// Select the variant.
00656     ///
00657     /// @return
00658     ///   Reference to the variant data.
00659     TNum& SetNum(void);
00660     /// Select the variant and set its data.
00661     ///
00662     /// @param value
00663     ///   Reference to the data.
00664     void SetNum(TNum& value);
00665 
00666 
00667     /// Check if variant Psec_str is selected.
00668     ///
00669     /// Psec_str type is defined as 'typedef EPsec_str TPsec_str'.
00670     /// @return
00671     ///   - true, if the variant is selected.
00672     ///   - false, otherwise.
00673     bool IsPsec_str(void) const;
00674 
00675     /// Get the variant data.
00676     ///
00677     /// @return
00678     ///   Copy of the variant data.
00679     TPsec_str GetPsec_str(void) const;
00680 
00681     /// Select the variant.
00682     ///
00683     /// @return
00684     ///   Reference to the variant data.
00685     TPsec_str& SetPsec_str(void);
00686 
00687     /// Select the variant and set its data.
00688     ///
00689     /// @param value
00690     ///   Variant data.
00691     void SetPsec_str(TPsec_str value);
00692 
00693 
00694     /// Check if variant Non_std_residue is selected.
00695     ///
00696     /// Non_std_residue type is defined as 'typedef string TNon_std_residue'.
00697     /// @return
00698     ///   - true, if the variant is selected.
00699     ///   - false, otherwise.
00700     bool IsNon_std_residue(void) const;
00701 
00702     /// Get the variant data.
00703     ///
00704     /// @return
00705     ///   Reference to the data.
00706     const TNon_std_residue& GetNon_std_residue(void) const;
00707 
00708     /// Select the variant.
00709     ///
00710     /// @return
00711     ///   Reference to the variant data.
00712     TNon_std_residue& SetNon_std_residue(void);
00713 
00714     /// Select the variant and set its data.
00715     ///
00716     /// @param value
00717     ///   Variant data.
00718     void SetNon_std_residue(const TNon_std_residue& value);
00719 
00720 
00721     /// Check if variant Het is selected.
00722     ///
00723     /// Het type is defined as 'typedef CHeterogen THet'.
00724     /// @return
00725     ///   - true, if the variant is selected.
00726     ///   - false, otherwise.
00727     bool IsHet(void) const;
00728 
00729     /// Get the variant data.
00730     ///
00731     /// @return
00732     ///   Reference to the data.
00733     const THet& GetHet(void) const;
00734 
00735     /// Select the variant.
00736     ///
00737     /// @return
00738     ///   Reference to the variant data.
00739     THet& SetHet(void);
00740 
00741     /// Select the variant and set its data.
00742     ///
00743     /// @param value
00744     ///   Variant data.
00745     void SetHet(const THet& value);
00746 
00747 
00748     /// Check if variant Biosrc is selected.
00749     ///
00750     /// Biosrc type is defined as 'typedef CBioSource TBiosrc'.
00751     /// @return
00752     ///   - true, if the variant is selected.
00753     ///   - false, otherwise.
00754     bool IsBiosrc(void) const;
00755 
00756     /// Get the variant data.
00757     ///
00758     /// @return
00759     ///   Reference to the data.
00760     const TBiosrc& GetBiosrc(void) const;
00761 
00762     /// Select the variant.
00763     ///
00764     /// @return
00765     ///   Reference to the variant data.
00766     TBiosrc& SetBiosrc(void);
00767     /// Select the variant and set its data.
00768     ///
00769     /// @param value
00770     ///   Reference to the data.
00771     void SetBiosrc(TBiosrc& value);
00772 
00773 
00774     /// Check if variant Clone is selected.
00775     ///
00776     /// Clone type is defined as 'typedef CClone_ref TClone'.
00777     /// @return
00778     ///   - true, if the variant is selected.
00779     ///   - false, otherwise.
00780     bool IsClone(void) const;
00781 
00782     /// Get the variant data.
00783     ///
00784     /// @return
00785     ///   Reference to the data.
00786     const TClone& GetClone(void) const;
00787 
00788     /// Select the variant.
00789     ///
00790     /// @return
00791     ///   Reference to the variant data.
00792     TClone& SetClone(void);
00793     /// Select the variant and set its data.
00794     ///
00795     /// @param value
00796     ///   Reference to the data.
00797     void SetClone(TClone& value);
00798 
00799 
00800     /// Check if variant Variation is selected.
00801     ///
00802     /// Variation type is defined as 'typedef CVariation_ref TVariation'.
00803     /// @return
00804     ///   - true, if the variant is selected.
00805     ///   - false, otherwise.
00806     bool IsVariation(void) const;
00807 
00808     /// Get the variant data.
00809     ///
00810     /// @return
00811     ///   Reference to the data.
00812     const TVariation& GetVariation(void) const;
00813 
00814     /// Select the variant.
00815     ///
00816     /// @return
00817     ///   Reference to the variant data.
00818     TVariation& SetVariation(void);
00819     /// Select the variant and set its data.
00820     ///
00821     /// @param value
00822     ///   Reference to the data.
00823     void SetVariation(TVariation& value);
00824 
00825 
00826 private:
00827     // copy constructor and assignment operator
00828     CSeqFeatData_Base(const CSeqFeatData_Base& );
00829     CSeqFeatData_Base& operator=(const CSeqFeatData_Base& );
00830     // choice state
00831     E_Choice m_choice;
00832     // helper methods
00833     void DoSelect(E_Choice index, CObjectMemoryPool* pool = 0);
00834 
00835     static const char* const sm_SelectionNames[];
00836     // data
00837     union {
00838         TBond m_Bond;
00839         TSite m_Site;
00840         TPsec_str m_Psec_str;
00841         NCBI_NS_NCBI::CUnionBuffer<THet> m_Het;
00842         NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string> m_string;
00843         NCBI_NS_NCBI::CSerialObject *m_object;
00844     };
00845 };
00846 
00847 /* @} */
00848 
00849 
00850 
00851 
00852 
00853 ///////////////////////////////////////////////////////////
00854 ///////////////////// inline methods //////////////////////
00855 ///////////////////////////////////////////////////////////
00856 inline
00857 CSeqFeatData_Base::E_Choice CSeqFeatData_Base::Which(void) const
00858 {
00859     return m_choice;
00860 }
00861 
00862 inline
00863 void CSeqFeatData_Base::CheckSelected(E_Choice index) const
00864 {
00865     if ( m_choice != index )
00866         ThrowInvalidSelection(index);
00867 }
00868 
00869 inline
00870 void CSeqFeatData_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset, NCBI_NS_NCBI::CObjectMemoryPool* pool)
00871 {
00872     if ( reset == NCBI_NS_NCBI::eDoResetVariant || m_choice != index ) {
00873         if ( m_choice != e_not_set )
00874             ResetSelection();
00875         DoSelect(index, pool);
00876     }
00877 }
00878 
00879 inline
00880 void CSeqFeatData_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset)
00881 {
00882     Select(index, reset, 0);
00883 }
00884 
00885 inline
00886 bool CSeqFeatData_Base::IsGene(void) const
00887 {
00888     return m_choice == e_Gene;
00889 }
00890 
00891 inline
00892 bool CSeqFeatData_Base::IsOrg(void) const
00893 {
00894     return m_choice == e_Org;
00895 }
00896 
00897 inline
00898 bool CSeqFeatData_Base::IsCdregion(void) const
00899 {
00900     return m_choice == e_Cdregion;
00901 }
00902 
00903 inline
00904 bool CSeqFeatData_Base::IsProt(void) const
00905 {
00906     return m_choice == e_Prot;
00907 }
00908 
00909 inline
00910 bool CSeqFeatData_Base::IsRna(void) const
00911 {
00912     return m_choice == e_Rna;
00913 }
00914 
00915 inline
00916 bool CSeqFeatData_Base::IsPub(void) const
00917 {
00918     return m_choice == e_Pub;
00919 }
00920 
00921 inline
00922 bool CSeqFeatData_Base::IsSeq(void) const
00923 {
00924     return m_choice == e_Seq;
00925 }
00926 
00927 inline
00928 bool CSeqFeatData_Base::IsImp(void) const
00929 {
00930     return m_choice == e_Imp;
00931 }
00932 
00933 inline
00934 bool CSeqFeatData_Base::IsRegion(void) const
00935 {
00936     return m_choice == e_Region;
00937 }
00938 
00939 inline
00940 const CSeqFeatData_Base::TRegion& CSeqFeatData_Base::GetRegion(void) const
00941 {
00942     CheckSelected(e_Region);
00943     return *m_string;
00944 }
00945 
00946 inline
00947 CSeqFeatData_Base::TRegion& CSeqFeatData_Base::SetRegion(void)
00948 {
00949     Select(e_Region, NCBI_NS_NCBI::eDoNotResetVariant);
00950     return *m_string;
00951 }
00952 
00953 inline
00954 bool CSeqFeatData_Base::IsComment(void) const
00955 {
00956     return m_choice == e_Comment;
00957 }
00958 
00959 inline
00960 void CSeqFeatData_Base::SetComment(void)
00961 {
00962     Select(e_Comment, NCBI_NS_NCBI::eDoNotResetVariant);
00963 }
00964 
00965 inline
00966 bool CSeqFeatData_Base::IsBond(void) const
00967 {
00968     return m_choice == e_Bond;
00969 }
00970 
00971 inline
00972 CSeqFeatData_Base::TBond CSeqFeatData_Base::GetBond(void) const
00973 {
00974     CheckSelected(e_Bond);
00975     return m_Bond;
00976 }
00977 
00978 inline
00979 CSeqFeatData_Base::TBond& CSeqFeatData_Base::SetBond(void)
00980 {
00981     Select(e_Bond, NCBI_NS_NCBI::eDoNotResetVariant);
00982     return m_Bond;
00983 }
00984 
00985 inline
00986 void CSeqFeatData_Base::SetBond(CSeqFeatData_Base::TBond value)
00987 {
00988     Select(e_Bond, NCBI_NS_NCBI::eDoNotResetVariant);
00989     m_Bond = value;
00990 }
00991 
00992 inline
00993 bool CSeqFeatData_Base::IsSite(void) const
00994 {
00995     return m_choice == e_Site;
00996 }
00997 
00998 inline
00999 CSeqFeatData_Base::TSite CSeqFeatData_Base::GetSite(void) const
01000 {
01001     CheckSelected(e_Site);
01002     return m_Site;
01003 }
01004 
01005 inline
01006 CSeqFeatData_Base::TSite& CSeqFeatData_Base::SetSite(void)
01007 {
01008     Select(e_Site, NCBI_NS_NCBI::eDoNotResetVariant);
01009     return m_Site;
01010 }
01011 
01012 inline
01013 void CSeqFeatData_Base::SetSite(CSeqFeatData_Base::TSite value)
01014 {
01015     Select(e_Site, NCBI_NS_NCBI::eDoNotResetVariant);
01016     m_Site = value;
01017 }
01018 
01019 inline
01020 bool CSeqFeatData_Base::IsRsite(void) const
01021 {
01022     return m_choice == e_Rsite;
01023 }
01024 
01025 inline
01026 bool CSeqFeatData_Base::IsUser(void) const
01027 {
01028     return m_choice == e_User;
01029 }
01030 
01031 inline
01032 bool CSeqFeatData_Base::IsTxinit(void) const
01033 {
01034     return m_choice == e_Txinit;
01035 }
01036 
01037 inline
01038 bool CSeqFeatData_Base::IsNum(void) const
01039 {
01040     return m_choice == e_Num;
01041 }
01042 
01043 inline
01044 bool CSeqFeatData_Base::IsPsec_str(void) const
01045 {
01046     return m_choice == e_Psec_str;
01047 }
01048 
01049 inline
01050 CSeqFeatData_Base::TPsec_str CSeqFeatData_Base::GetPsec_str(void) const
01051 {
01052     CheckSelected(e_Psec_str);
01053     return m_Psec_str;
01054 }
01055 
01056 inline
01057 CSeqFeatData_Base::TPsec_str& CSeqFeatData_Base::SetPsec_str(void)
01058 {
01059     Select(e_Psec_str, NCBI_NS_NCBI::eDoNotResetVariant);
01060     return m_Psec_str;
01061 }
01062 
01063 inline
01064 void CSeqFeatData_Base::SetPsec_str(CSeqFeatData_Base::TPsec_str value)
01065 {
01066     Select(e_Psec_str, NCBI_NS_NCBI::eDoNotResetVariant);
01067     m_Psec_str = value;
01068 }
01069 
01070 inline
01071 bool CSeqFeatData_Base::IsNon_std_residue(void) const
01072 {
01073     return m_choice == e_Non_std_residue;
01074 }
01075 
01076 inline
01077 const CSeqFeatData_Base::TNon_std_residue& CSeqFeatData_Base::GetNon_std_residue(void) const
01078 {
01079     CheckSelected(e_Non_std_residue);
01080     return *m_string;
01081 }
01082 
01083 inline
01084 CSeqFeatData_Base::TNon_std_residue& CSeqFeatData_Base::SetNon_std_residue(void)
01085 {
01086     Select(e_Non_std_residue, NCBI_NS_NCBI::eDoNotResetVariant);
01087     return *m_string;
01088 }
01089 
01090 inline
01091 bool CSeqFeatData_Base::IsHet(void) const
01092 {
01093     return m_choice == e_Het;
01094 }
01095 
01096 inline
01097 const CSeqFeatData_Base::THet& CSeqFeatData_Base::GetHet(void) const
01098 {
01099     CheckSelected(e_Het);
01100     return *m_Het;
01101 }
01102 
01103 inline
01104 CSeqFeatData_Base::THet& CSeqFeatData_Base::SetHet(void)
01105 {
01106     Select(e_Het, NCBI_NS_NCBI::eDoNotResetVariant);
01107     return *m_Het;
01108 }
01109 
01110 inline
01111 bool CSeqFeatData_Base::IsBiosrc(void) const
01112 {
01113     return m_choice == e_Biosrc;
01114 }
01115 
01116 inline
01117 bool CSeqFeatData_Base::IsClone(void) const
01118 {
01119     return m_choice == e_Clone;
01120 }
01121 
01122 inline
01123 bool CSeqFeatData_Base::IsVariation(void) const
01124 {
01125     return m_choice == e_Variation;
01126 }
01127 
01128 ///////////////////////////////////////////////////////////
01129 ////////////////// end of inline methods //////////////////
01130 ///////////////////////////////////////////////////////////
01131 
01132 
01133 
01134 
01135 
01136 END_objects_SCOPE // namespace ncbi::objects::
01137 
01138 END_NCBI_SCOPE
01139 
01140 
01141 #endif // OBJECTS_SEQFEAT_SEQFEATDATA_BASE_HPP
Modified on Fri Jan 30 12:49:10 2015 by modify_doxy.py rev. 426318