include/AbstractSuit.hpp

Go to the documentation of this file.
00001 // AbstractSuit.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 ABSTRACTSUIT
00017 #define ABSTRACTSUIT
00018 
00019 #include <iostream>
00020 #include "VerboseOption.hpp"
00021 
00022 namespace regal{
00023   
00024   class AbstractSuit{
00025   protected:
00026     int * tab; 
00027     int size; 
00028     int position; 
00029   public:
00030     virtual int * first()=0;
00031     virtual int * next()=0;
00032     
00033     
00034     int getSize(){return size;}
00035     int * getSuit(){return tab;}
00036     
00041     AbstractSuit(const int & s){
00042       size=s;
00043       position=0;
00044       tab=new int[s];
00045       verbose("Creation of an AbstractSuit");
00046     }
00047     
00051     virtual ~AbstractSuit(){
00052       delete [] tab;
00053       verbose("Destruction of an AbstractSuit");
00054     }
00055     
00056     
00061     friend std::ostream& operator<<(std::ostream& o,const AbstractSuit & a){
00062       int i;
00063       for(i=0;i<a.size;i++)o<<a.tab[i]<<" ";
00064       return o;
00065     }
00066     
00067   };
00068 
00069 }
00070 
00071 #endif

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