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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_HIT_MATRIX___ALIGN_SEQ_TABLE__HPP
2 #define GUI_WIDGETS_HIT_MATRIX___ALIGN_SEQ_TABLE__HPP
3 
4 /* $Id: align_seq_table.hpp 15592 2007-12-20 23:18:51Z voronov $
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  * Authors: Andrey Yazhuk
30  *
31  * File Description:
32  *
33  */
34 
37 
39 
40 #include <objmgr/scope.hpp>
41 
42 
44 
45 ///////////////////////////////////////////////////////////////////////////////
46 /// CAlignSeqTableModel
48 {
49 public:
51 
52  void Init( IHitMatrixDataSource& ds, const TIdVector& ids );
53  void Clear();
54 
55  /// @name ITableModel virtual functions implementation
56  /// @{
57  virtual int GetNumRows() const;
58  virtual int GetNumColumns() const;
59  virtual wxVariant GetValueAt( int row, int column ) const;
60 
61  virtual wxString GetColumnType( int col_ix ) const;
62  virtual wxString GetColumnName( int col_ix ) const;
63  /// @}
64 
65  const IHitSeqId* GetId( int row ) const;
66 
67 protected:
68  struct SRow {
70  string m_IdLabel;
71  string m_Title;
72  string m_Organism;
73  string m_Length;
74  };
75 
76  string x_GetTitle( objects::CBioseq_Handle& handle ) const;
77  string x_GetOrganism( objects::CBioseq_Handle& handle ) const;
78  string x_GetLength( objects::CBioseq_Handle& handle ) const;
79 
80 protected:
81  vector<SRow*> m_Rows;
82 };
83 
84 
86 
87 #endif // GUI_WIDGETS_HIT_MATRIX___ALIGN_SEQ_TABLE__HPP
CAlignSeqTableModel.
string x_GetOrganism(objects::CBioseq_Handle &handle) const
virtual wxString GetColumnName(int col_ix) const
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
const IHitSeqId * GetId(int row) const
virtual wxString GetColumnType(int col_ix) const
CAlignSeqTableModel.
vector< SRow * > m_Rows
IHitMatrixDataSource::TIdVector TIdVector
string x_GetLength(objects::CBioseq_Handle &handle) const
virtual int GetNumColumns() const
Returns the number of columns in the model.
virtual wxVariant GetValueAt(int row, int column) const
string x_GetTitle(objects::CBioseq_Handle &handle) const
virtual int GetNumRows() const
Returns the number of rows in the model.
void Init(IHitMatrixDataSource &ds, const TIdVector &ids)
CwxAbstractTableModel - simple TableModel implementation.
IHitMatrixDataSource - abstract Data Source for Hit Matrix Widget.
vector< IHitSeqId * > TIdVector
IHitSeqId - abstract identifier of a sequence in an alignment.
static const char * column
Definition: stats.c:23
#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 row(bind, expected)
Definition: string_bind.c:73
Modified on Sat May 25 14:18:23 2024 by modify_doxy.py rev. 669887