include/StatisticMaker.hpp

Go to the documentation of this file.
00001 // StatisticMaker.hpp: this file is part of the REGAL project.
00002 //
00003 // REGAL : Random and Exhaustive Generators for Automata - Library
00004 //
00005 // Copyright (C) 2007 Julien DAVID.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 //
00016 #ifndef STATISTICMAKER
00017 #define STATISTICMAKER
00018 
00019 namespace regal{
00020   
00021   struct InvalidStatsFileException : public std::exception {};
00022   
00023   
00024   class StatisticMaker{
00025   protected:
00026     FILE * output; // Output File for the statistics
00027     
00028     
00029   public:
00030     
00036     StatisticMaker(char * path,char * option){
00037       if((output=fopen(path,option))==NULL)
00038         throw new InvalidStatsFileException();
00039     }
00040     
00044     StatisticMaker(){
00045       output=NULL;
00046     }
00047     
00051     virtual ~StatisticMaker(){
00052       if(output!=NULL)
00053         fclose(output);
00054     }
00055     
00056   };
00057 
00058 }
00059 
00060 
00061 #endif 

Generated on Mon Sep 29 16:33:58 2008 for REGAL by  doxygen 1.5.1