1 #ifndef APP__READ_BLAST_RESULT__TBL__HPP
2 #define APP__READ_BLAST_RESULT__TBL__HPP
3 
4 /*  $Id: tbl.hpp 118238 2008-01-25 16:49:20Z ucko $
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: Azat Badretdin
30 *
31 * File Description:
32 *   auxilliary tbl class header
33 *
34 * ===========================================================================
35 */
36 
37 #include <corelib/ncbiobj.hpp>
38 
39 USING_NCBI_SCOPE;
40 
41 
42 class Ctbl_seg : public CObject
43 {
44 public:
45   typedef map < string, string > Ttbl_qual;
46 
47   bool Read(istream& in);
48 
GetFuzzyFrom(void) const49   const bool& GetFuzzyFrom(void) const  { return m_fuzzy_from; } ;
SetFuzzyFrom(void)50   bool&       SetFuzzyFrom(void)        { return m_fuzzy_from; } ;
SetFuzzyFrom(bool & value)51   void        SetFuzzyFrom(bool& value) { m_fuzzy_from = value; } ;
52 
GetFuzzyTo(void) const53   const bool& GetFuzzyTo(void) const  { return m_fuzzy_to; } ;
SetFuzzyTo(void)54   bool&       SetFuzzyTo(void)        { return m_fuzzy_to; } ;
SetFuzzyTo(bool & value)55   void        SetFuzzyTo(bool& value) { m_fuzzy_to = value; } ;
56 
GetFrom(void) const57   const int&  GetFrom(void) const   { return m_from; } ;
SetFrom(void)58   int&        SetFrom(void)         { return m_from; } ;
SetFrom(int & value)59   void        SetFrom(int& value)   { m_from = value; } ;
60 
GetTo(void) const61   const int&  GetTo(void) const   { return m_to; } ;
SetTo(void)62   int&        SetTo(void)         { return m_to; } ;
SetTo(int & value)63   void        SetTo(int& value)   { m_to = value; } ;
64 
GetKey(void) const65   const string& GetKey(void) const    { return m_key; } ;
SetKey(void)66   string&       SetKey(void)          { return m_key; } ;
SetKey(string & value)67   void          SetKey(string& value) { m_key = value; } ;
68 
GetQual(void) const69   const Ttbl_qual& GetQual(void) const    { return m_qual; } ;
SetQual(void)70   Ttbl_qual&       SetQual(void)          { return m_qual; } ;
SetQual(Ttbl_qual & value)71   void             SetQual(Ttbl_qual& value) { m_qual = value; } ;
72 
73 private:
74   bool m_fuzzy_from;
75   bool m_fuzzy_to;
76   int  m_from;
77   int  m_to;
78   string m_key;
79   Ttbl_qual m_qual;
80 };
81 
82 
83 
84 class Ctbl_feat : public CObject
85 {
86 public:
87   typedef list < CRef < Ctbl_seg > > Ttbl_seg;
88   bool Read(istream& in);
89 
GetSeg(void) const90   const Ttbl_seg& GetSeg(void) const    { return m_seg; } ;
SetSeg(void)91   Ttbl_seg&       SetSeg(void)          { return m_seg; } ;
SetSeg(Ttbl_seg & value)92   void            SetSeg(Ttbl_seg& value) { m_seg = value; } ;
93 
GetSeqid(void) const94   const string&   GetSeqid(void) const  { return m_seqid; } ;
SetSeqid(void)95   string&         SetSeqid(void)        { return m_seqid; } ;
SetSeqid(string & value)96   void            SetSeqid(string& value) { m_seqid = value; } ;
97 
GetTableName(void) const98   const string&   GetTableName(void) const  { return m_table_name; } ;
SetTableName(void)99   string&         SetTableName(void)        { return m_table_name; } ;
SetTableName(string & value)100   void            SetTableName(string& value) { m_table_name = value; } ;
101 
102 private:
103   Ttbl_seg m_seg;
104   string   m_seqid;
105   string   m_table_name;
106 };
107 
108 
109 
110 class Ctbl
111 {
112 public:
113   typedef list < CRef < Ctbl_feat > > Ttbl_feat;
114   bool Read(istream& in);
115 
GetFeat(void) const116   const Ttbl_feat&    GetFeat(void) const    { return m_feat; } ;
SetFeat(void)117   Ttbl_feat&          SetFeat(void)          { return m_feat; } ;
SetFeat(Ttbl_feat & value)118   void                SetFeat(Ttbl_feat& value) { m_feat = value; } ;
119 private:
120   Ttbl_feat m_feat;
121 };
122 
123 
124 #endif /* APP__READ_BLAST_RESULT__TBL__HPP */
125