- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# vgraph_container.hh

    00001 // vgraph_container.hh: this file is part of the Vaucanson project.
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2007, 2008 The Vaucanson Group.
    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 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
    00016 //
    00017
    00018 #ifndef VAUCANSON_AUTOMATA_IMPLEMENTATION_BMIG_VGRAPH_CONTAINER_HH
    00019 # define VAUCANSON_AUTOMATA_IMPLEMENTATION_BMIG_VGRAPH_CONTAINER_HH
    00020
    00021 #include <iterator>
    00022
    00023 namespace vcsn
    00024 {
    00025   namespace bmig
    00026   {
    00027     template<typename EdgesIterator, typename GraphData, typename HTransition>
    00028     class VGraphContainerIterator
    00029     {
    00030     public:
    00031       typedef EdgesIterator     iterator;
    00032       VGraphContainerIterator(const GraphData& c, EdgesIterator i);
    00033       HTransition operator*() const;
    00034
    00035       bool operator==(const VGraphContainerIterator& v) const;
    00036       bool operator!=(const VGraphContainerIterator& v) const;
    00037       VGraphContainerIterator& operator++();
    00038       VGraphContainerIterator operator++(int);
    00039
    00040     private:
    00041       iterator it_;
    00042       iterator next_;
    00043       const GraphData& container_;
    00044     };
    00045
    00046     template<typename EdgesIterator, typename GraphData, typename HTransition>
    00047     class VGraphContainer
    00048     {
    00049     public:
    00050       typedef VGraphContainerIterator<EdgesIterator, GraphData, HTransition> iterator;
    00051       typedef iterator              const_iterator;
    00052
    00053       VGraphContainer(const GraphData& g);
    00054
    00055       iterator begin() const;
    00056       iterator end() const;
    00057
    00058       size_t size() const;
    00059
    00060     private:
    00061       const GraphData& graph_;
    00062     };
    00063   }
    00064 }
    00065
    00066 # include <vaucanson/automata/implementation/bmig/vgraph_container.hxx>
    00067
    00068 #endif // !VAUCANSON_AUTOMATA_IMPLEMENTATION_BMIG_VGRAPH_CONTAINER_HH