StatsResult.h

00001 #ifndef StatsResult_H
00002 #define StatsResult_H
00003 
00004 /* --8<--8<--8<--8<--
00005  *
00006  * Copyright (C) 2006 Smithsonian Astrophysical Observatory
00007  *
00008  * This file is part of rdbstats
00009  *
00010  * rdbstats is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU General Public License
00012  * as published by the Free Software Foundation; either version 2
00013  * of the License, or (at your option) any later version.
00014  *
00015  * rdbstats is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the 
00022  *       Free Software Foundation, Inc. 
00023  *       51 Franklin Street, Fifth Floor
00024  *       Boston, MA  02110-1301, USA
00025  *
00026  * -->8-->8-->8-->8-- */
00027 
00028 #include <Exception/Exception.h>
00029 
00030 #include "SelectedCols.h"
00031 
00035 template <class Type>
00036 class StatsResult {
00037 
00038 public:
00039 
00040   virtual ~StatsResult( ) { }
00041 
00042   StatsResult( Type& col, RDB& otable ) throw( Exception );
00043 
00044   void calculate_statistics( ) throw( );
00045 
00046   void update_statistics( ) throw( Exception );
00047 
00048 protected:
00049 
00051   Type& rdb_stats_columns;
00052 
00054   RDB& ordbtable;
00055 
00056 };
00057 
00058 #ifndef StatsResult_cc
00059 #include "StatsResult.cc"
00060 #endif
00061 
00062 #endif