rdbstats  2.0.7
Row.h
1 #ifndef Row_H
2 #define Row_H
3 
4 /* --8<--8<--8<--8<--
5  *
6  * Copyright (C) 2006 Smithsonian Astrophysical Observatory
7  *
8  * This file is part of rdbstats
9  *
10  * rdbstats is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * rdbstats is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the
22  * Free Software Foundation, Inc.
23  * 51 Franklin Street, Fifth Floor
24  * Boston, MA 02110-1301, USA
25  *
26  * -->8-->8-->8-->8-- */
27 
28 #include <vector>
29 
30 class Exception;
31 
32 class Row {
33 
34  friend std::ostream& operator << ( std::ostream& os, Row& a ) {
35  a.print( os );
36  return os;
37  }
38 
39  friend std::ostream& operator << ( std::ostream& os, Row* a ) {
40  a->print( os );
41  return os;
42  }
43 
44 public:
45 
46  ~Row( ) { }
47 
48  Row( const std::vector< std::string >& row_options );
49 
50  const std::vector< std::pair< long, long > >& get_range( ) { return start_end; }
51 
52 private:
53 
54  void print( std::ostream& os ) const;
55 
56  std::vector< std::pair< long, long > > start_end;
57 
58 };
59 
60 #endif