pat_fam.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2005 M.J. Zaki <zaki@cs.rpi.edu> Rensselaer Polytechnic Institute
00003  *  Written by parimi@cs.rpi.edu
00004  *  Updated by chaojv@cs.rpi.edu, alhasan@cs.rpi.edu, salems@cs.rpi.edu
00005  *
00006  *  This program is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU General Public License
00008  *  as published by the Free Software Foundation; either version 2
00009  *  of the License, or (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00019  */
00022 #ifndef _PAT_FAM
00023 #define _PAT_FAM
00024 
00025 #include <iostream>
00026 #include <vector>
00027 
00028 // this container shall be eventually buffered //
00029 
00030 template<typename P, template<typename T> class ST>
00031 class pat_fam;
00032 template<typename P, template<typename T> class ST>
00033 std::ostream& operator<< (std::ostream&, const pat_fam<P, ST>&);
00034 
00041 template<typename P, template<typename T> class ST=std::vector>
00042 class pat_fam: public ST<P*>
00043 {
00044   public:
00045   typedef typename ST<P*>::iterator IT; 
00046   typedef typename ST<P*>::const_iterator CONST_IT; 
00053   friend std::ostream& operator<< <>(std::ostream&, const pat_fam<P, ST>&);
00054 };
00055 
00056 template<class P>
00057 std::ostream& operator<< (std::ostream& ostr, const pat_fam<P, std::vector>& pats)
00058 {
00059   typename pat_fam<P, std::vector>::CONST_IT it;
00060   for(it=pats.begin(); it!=pats.end(); it++)
00061     ostr<<*it;
00062   return ostr;
00063 }
00064 
00065 #endif

Generated on Wed Jul 26 14:01:08 2006 for DMTL by  doxygen 1.4.7