Dbtag.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:6k
源码类别:

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: Dbtag.hpp,v $
  4.  * PRODUCTION Revision 1000.2  2004/06/01 19:30:27  gouriano
  5.  * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. /* $Id: Dbtag.hpp,v 1000.2 2004/06/01 19:30:27 gouriano Exp $
  10.  * ===========================================================================
  11.  *
  12.  *                            PUBLIC DOMAIN NOTICE
  13.  *               National Center for Biotechnology Information
  14.  *
  15.  *  This software/database is a "United States Government Work" under the
  16.  *  terms of the United States Copyright Act.  It was written as part of
  17.  *  the author's official duties as a United States Government employee and
  18.  *  thus cannot be copyrighted.  This software/database is freely available
  19.  *  to the public for use. The National Library of Medicine and the U.S.
  20.  *  Government have not placed any restriction on its use or reproduction.
  21.  *
  22.  *  Although all reasonable efforts have been taken to ensure the accuracy
  23.  *  and reliability of the software and data, the NLM and the U.S.
  24.  *  Government do not and cannot warrant the performance or results that
  25.  *  may be obtained by using this software or data. The NLM and the U.S.
  26.  *  Government disclaim all warranties, express or implied, including
  27.  *  warranties of performance, merchantability or fitness for any particular
  28.  *  purpose.
  29.  *
  30.  *  Please cite the author in any work or product based on this material.
  31.  *
  32.  * ===========================================================================
  33.  *
  34.  * Author:  .......
  35.  *
  36.  * File Description:
  37.  *   .......
  38.  *
  39.  * Remark:
  40.  *   This code was originally generated by application DATATOOL
  41.  *   using specifications from the ASN data definition file
  42.  *   'general.asn'.
  43.  *
  44.  * ---------------------------------------------------------------------------
  45.  */
  46. #ifndef OBJECTS_GENERAL_DBTAG_HPP
  47. #define OBJECTS_GENERAL_DBTAG_HPP
  48. // generated includes
  49. #include <objects/general/Dbtag_.hpp>
  50. // generated classes
  51. BEGIN_NCBI_SCOPE
  52. BEGIN_objects_SCOPE // namespace ncbi::objects::
  53. class NCBI_GENERAL_EXPORT CDbtag : public CDbtag_Base
  54. {
  55.     typedef CDbtag_Base Tparent;
  56. public:
  57.     // this must be kept in sync with the (private) list in Dbtag.cpp!
  58.     enum EDbtagType {
  59.         eDbtagType_bad,
  60.         eDbtagType_ATCC,
  61.         eDbtagType_ATCC_dna,
  62.         eDbtagType_ATCC_in_host,
  63.         eDbtagType_AceView_WormGenes,
  64.         eDbtagType_BDGP_EST,
  65.         eDbtagType_BDGP_INS,
  66.         eDbtagType_CDD,
  67.         eDbtagType_CK,
  68.         eDbtagType_COG,
  69.         eDbtagType_ENSEMBL,
  70.         eDbtagType_ESTLIB,
  71.         eDbtagType_FANTOM_DB,
  72.         eDbtagType_FLYBASE,
  73.         eDbtagType_GABI,
  74.         eDbtagType_GDB,
  75.         eDbtagType_GI,
  76.         eDbtagType_GO,
  77.         eDbtagType_GOA,
  78.         eDbtagType_GeneDB,
  79.         eDbtagType_GeneID,
  80.         eDbtagType_IFO,
  81.         eDbtagType_IMGT_HLA,
  82.         eDbtagType_IMGT_LIGM,
  83.         eDbtagType_ISFinder,
  84.         eDbtagType_InterimID,
  85.         eDbtagType_Interpro,
  86.         eDbtagType_JCM,
  87.         eDbtagType_LocusID,
  88.         eDbtagType_MGD,
  89.         eDbtagType_MGI,
  90.         eDbtagType_MIM,
  91.         eDbtagType_MaizeDB,
  92.         eDbtagType_NextDB,
  93.         eDbtagType_PID,
  94.         eDbtagType_PIDd,
  95.         eDbtagType_PIDe,
  96.         eDbtagType_PIDg,
  97.         eDbtagType_PIR,
  98.         eDbtagType_PSEUDO,
  99.         eDbtagType_RATMAP,
  100.         eDbtagType_REMTREMBL,
  101.         eDbtagType_RGD,
  102.         eDbtagType_RZPD,
  103.         eDbtagType_RiceGenes,
  104.         eDbtagType_SGD,
  105.         eDbtagType_SPTREMBL,
  106.         eDbtagType_SWISS_PROT,
  107.         eDbtagType_SoyBase,
  108.         eDbtagType_UniGene,
  109.         eDbtagType_UniSTS,
  110.         eDbtagType_WorfDB,
  111.         eDbtagType_WormBase,
  112.         eDbtagType_ZFIN,
  113.         eDbtagType_dbEST,
  114.         eDbtagType_dbSNP,
  115.         eDbtagType_dbSTS,
  116.         eDbtagType_niaEST,
  117.         eDbtagType_taxon,
  118.         // only approved for RefSeq
  119.         eDbtagType_GenBank,
  120.         eDbtagType_EMBL,
  121.         eDbtagType_DDBJ,
  122.         eDbtagType_REBASE
  123.     };
  124.     // constructor
  125.     CDbtag(void);
  126.     // destructor
  127.     ~CDbtag(void);
  128.     // Comparison functions
  129.     bool Match(const CDbtag& dbt2) const;
  130.     int Compare(const CDbtag& dbt2) const;
  131.     
  132.     // Appends a label to "label" based on content of CDbtag
  133.     void GetLabel(string* label) const;
  134.     // Test if DB is approved by the consortium.
  135.     // 'GenBank', 'EMBL' and 'DDBJ' are approved only in the
  136.     // context of a RefSeq record.
  137.     bool IsApproved(bool refseq = false) const;
  138.     // Test if DB is approved (case insensitive).
  139.     // Returns the case sensetive DB name if approved, NULL otherwise.
  140.     const char* IsApprovedNoCase(bool refseq = false) const;
  141.     // Retrieve the enumerated type for the dbtag
  142.     EDbtagType GetType(void) const;
  143.     // Force a refresh of the internal type
  144.     void InvalidateType(void);
  145.     
  146. private:
  147.     // our enumerated (parsed) type
  148.     mutable EDbtagType m_Type;
  149.     // Prohibit copy constructor & assignment operator
  150.     CDbtag(const CDbtag&);
  151.     CDbtag& operator= (const CDbtag&);
  152. };
  153. /////////////////// CDbtag inline methods
  154. // constructor
  155. inline
  156. CDbtag::CDbtag(void)
  157.     : m_Type(eDbtagType_bad)
  158. {
  159. }
  160. /////////////////// end of CDbtag inline methods
  161. END_objects_SCOPE // namespace ncbi::objects::
  162. END_NCBI_SCOPE
  163. /*
  164.  * ===========================================================================
  165.  * $Log: Dbtag.hpp,v $
  166.  * Revision 1000.2  2004/06/01 19:30:27  gouriano
  167.  * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8
  168.  *
  169.  * Revision 1.8  2004/05/28 20:09:44  johnson
  170.  * Added Compare for seq-id type General (CDbtag)
  171.  *
  172.  * Revision 1.7  2004/04/23 16:55:29  shomrat
  173.  * + IsApprovedNoCase
  174.  *
  175.  * Revision 1.6  2004/01/20 16:04:36  dicuccio
  176.  * Implemented enumerated type interpretation of string-based database name
  177.  *
  178.  * Revision 1.5  2003/06/27 15:39:49  shomrat
  179.  * Added IsApproved
  180.  *
  181.  * Revision 1.4  2002/12/26 12:40:33  dicuccio
  182.  * Added Win32 export specifiers
  183.  *
  184.  * Revision 1.3  2002/01/10 19:48:26  clausen
  185.  * Added GetLabel
  186.  *
  187.  * Revision 1.2  2001/06/25 18:51:58  grichenk
  188.  * Prohibited copy constructor and assignment operator
  189.  *
  190.  * Revision 1.1  2000/11/21 18:58:04  vasilche
  191.  * Added Match() methods for CSeq_id, CObject_id and CDbtag.
  192.  *
  193.  * ===========================================================================
  194.  */
  195. #endif // OBJECTS_GENERAL_DBTAG_HPP