1 #ifndef ALGO_BLAST_API__VERSION__HPP
2 #define ALGO_BLAST_API__VERSION__HPP
3 
4 /*  $Id: version.hpp 591546 2019-08-16 16:59:06Z vasilche $
5  * ===========================================================================
6  *
7  *                            PUBLIC DOMAIN NOTICE
8  *               National Center for Biotechnology Information
9  *
10  *  This software/database is a "United States Government Work" under the
11  *  terms of the United States Copyright Act.  It was written as part of
12  *  the author's official duties as a United States Government employee and
13  *  thus cannot be copyrighted.  This software/database is freely available
14  *  to the public for use. The National Library of Medicine and the U.S.
15  *  Government have not placed any restriction on its use or reproduction.
16  *
17  *  Although all reasonable efforts have been taken to ensure the accuracy
18  *  and reliability of the software and data, the NLM and the U.S.
19  *  Government do not and cannot warrant the performance or results that
20  *  may be obtained by using this software or data. The NLM and the U.S.
21  *  Government disclaim all warranties, express or implied, including
22  *  warranties of performance, merchantability or fitness for any particular
23  *  purpose.
24  *
25  *  Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Author:  Christiam Camacho
30  *
31  */
32 
33 /** @file version.hpp
34  * Declares singleton objects to store the version and reference for the BLAST
35  * engine.
36  */
37 
38 #include <corelib/version_api.hpp>
39 #include <algo/blast/core/blast_engine.h>
40 
41 /** @addtogroup AlgoBlast
42  *
43  * @{
44  */
45 
46 BEGIN_NCBI_SCOPE
47 BEGIN_SCOPE(blast)
48 
49 /// Keeps track of the version of the BLAST engine in the NCBI C++ toolkit.
50 /// Used to perform run-time version checks
51 ///
52 /// For reference, please refer to http://apr.apache.org/versioning.html
53 class CBlastVersion : public CVersionInfo {
54 public:
CBlastVersion()55     CBlastVersion()
56         : CVersionInfo(kBlastMajorVersion,
57                        kBlastMinorVersion,
58                        kBlastPatchVersion) {}
Print(void) const59     virtual string Print(void) const {
60         return CVersionInfo::Print() + "+";
61     }
62 };
63 
64 
65 /// Class to keep track of the various BLAST references
66 class NCBI_XBLAST_EXPORT CReference
67 {
68 public:
69     /// Enumerates the various BLAST publications
70     enum EPublication {
71         eGappedBlast = 0,           ///< 1997 NAR paper
72         ePhiBlast,                  ///< 1998 NAR paper
73         eMegaBlast,                 ///< 2000 J Compt Biol paper
74         eCompBasedStats,            ///< 2001 NAR paper
75         eCompAdjustedMatrices,      ///< submitted for publication
76         eIndexedMegablast,          ///< 2008 Bioinformatics on indexed megablast
77         eDeltaBlast,          	    ///< 2012 Biology Direct on DeltaBLAST
78         eMaxPublications            ///< Used as sentinel value
79     };
80 
81     /// Reference for requested publication
82     static string GetString(EPublication pub);
83     /// Reference for requested publication without umlaut
84     static string GetHTMLFreeString(EPublication pub);
85     /// Get Pubmed url for requested publication
86     static string GetPubmedUrl(EPublication pub);
87 
88 private:
89     /// Prohibit constructing this class
90     CReference();
91     /// Prohibit copy constructor
92     CReference(const CReference& rhs);
93     /// Prohibit assignment operator
94     CReference& operator=(const CReference& rhs);
95 };
96 
97 END_SCOPE(blast)
98 END_NCBI_SCOPE
99 
100 /* @} */
101 
102 #endif  /* ALGO_BLAST_API__VERSION__HPP */
103