include/wipal/pcap/list_of_traces.hh

00001 /*
00002  * WiPal - A library and a set of tools to manipulate wireless traces.
00003  * Copyright (C) 2007  Universite Pierre et Marie Curie - Paris 6
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00018  * MA  02110-1301  USA
00019  *
00020  * Author: Thomas Claveirole <thomas.claveirole@lip6.fr>
00021  */
00022 #ifndef PCAP_LIST_OF_TRACES_HH_
00023 # define PCAP_LIST_OF_TRACES_HH_
00024 
00025 # include <wipal/tool/list_of_iterables.hh>
00026 # include <wipal/pcap/descriptor.hh>
00027 
00028 namespace pcapxx
00029 {
00030 
00031   template <class Desc = descriptor<>, class Bottom = tool::bottom>
00032   struct list_of_traces:
00033     public tool::list_of_iterables<Desc,
00034                                    tt_get_exact(Bottom,
00035                                                 list_of_traces<Desc, Bottom>)>
00036   {
00037     typedef tt_get_exact(Bottom, list_of_traces<Desc, Bottom>)  exact_type;
00038     typedef tool::list_of_iterables<Desc, exact_type>           super_type;
00039 
00040     list_of_traces(const std::string& trace_names = "",
00041                    const std::string& separators = ":");
00042 
00043     const std::string&  file_name() const;
00044     void                expect(typename Desc::link_type l) const;
00045 
00046   private:
00047     std::string name_;
00048   };
00049 
00050 } // End of namespace pcapxx.
00051 
00052 namespace tool
00053 {
00054 
00055   template <class Desc, class Bottom>
00056   struct types< pcapxx::list_of_traces<Desc, Bottom> >:
00057     public types< list_of_iterables<Desc,
00058                                     tt_get_exact(Bottom,
00059                                                  pcapxx::list_of_traces<Desc,
00060                                                                     Bottom>)> >
00061   {
00062   };
00063 
00064 } // End of namespace tool.
00065 
00066 # include "list_of_traces.hxx"
00067 
00068 #endif // ! PCAP_LIST_OF_TRACES_HH_

Generated on Tue Jan 15 19:32:31 2008 for wipal by  doxygen 1.5.4