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

Go to the SVN repository for this file.

1 #ifndef GUI_WX_DEMO___TEST_TABLE_HPP
2 #define GUI_WX_DEMO___TEST_TABLE_HPP
3 
4 
5 /* $Id: test_table.hpp 21484 2010-06-08 00:18:11Z voronov $
6 * ===========================================================================
7 *
8 * PUBLIC DOMAIN NOTICE
9 * National Center for Biotechnology Information
10 *
11 * This software/database is a "United States Government Work" under the
12 * terms of the United States Copyright Act. It was written as part of
13 * the author's official duties as a United States Government employee and
14 * thus cannot be copyrighted. This software/database is freely available
15 * to the public for use. The National Library of Medicine and the U.S.
16 * Government have not placed any restriction on its use or reproduction.
17 *
18 * Although all reasonable efforts have been taken to ensure the accuracy
19 * and reliability of the software and data, the NLM and the U.S.
20 * Government do not and cannot warrant the performance or results that
21 * may be obtained by using this software or data. The NLM and the U.S.
22 * Government disclaim all warranties, express or implied, including
23 * warranties of performance, merchantability or fitness for any particular
24 * purpose.
25 *
26 * Please cite the author in any work or product based on this material.
27 *
28 * ===========================================================================
29 *
30 * Authors: Igor Tolstoy
31 *
32 * File Description:
33 *
34 */
35 
36 #include <corelib/ncbistl.hpp>
37 
39 
41 
43 {
44 public :
45  enum EColumns {
55  eID,
63  };
64  CProteinModel();
66 
67  virtual wxString GetColumnName( int aColIx ) const;
68  virtual wxString GetColumnType( int aColIx ) const;
69  virtual int GetNumColumns() const;
70  virtual int GetNumRows() const;
71  virtual wxVariant GetValueAt( int i, int j ) const;
72 
73  bool IsMarked( int row ) const;
74  void SetMarked( int row, bool value );
75 
76 private:
77  void CalculateComputedFields( int first_row, int last_row );
78 
79  vector<bool> m_Marked;
80  struct SComputedFields {
81  string m_organism;
82  string m_gene_id;
83  string m_cdd;
84  string m_hamap;
85  string m_ko;
87  string m_arCOGs;
89  string m_uniprot;
90  };
91  vector<SComputedFields> m_ComputedFields;
92 };
93 
95 
96 #endif // GUI_WX_DEMO___TEST_TABLE_HPP
97 
virtual wxVariant GetValueAt(int i, int j) const
Definition: test_table.cpp:134
vector< SComputedFields > m_ComputedFields
Definition: test_table.hpp:91
virtual int GetNumRows() const
Returns the number of rows in the model.
Definition: test_table.cpp:118
virtual wxString GetColumnName(int aColIx) const
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
Definition: test_table.cpp:37
vector< bool > m_Marked
Definition: test_table.hpp:79
virtual wxString GetColumnType(int aColIx) const
Tries to extract actual type from row 0 value if it exists.
Definition: test_table.cpp:88
void CalculateComputedFields(int first_row, int last_row)
bool IsMarked(int row) const
Definition: test_table.cpp:123
virtual int GetNumColumns() const
Returns the number of columns in the model.
Definition: test_table.cpp:112
void SetMarked(int row, bool value)
Definition: test_table.cpp:127
CwxAbstractTableModel - simple TableModel implementation.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
int i
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
The NCBI C++/STL use hints.
#define row(bind, expected)
Definition: string_bind.c:73
Modified on Wed Apr 17 13:10:43 2024 by modify_doxy.py rev. 669887