yat/omic/VcfIterator.h

Code
Comments
Other
Rev Date Author Line
3774 26 Oct 18 peter 1 #ifndef theplu_yat_omic_vcf_iterator
3774 26 Oct 18 peter 2 #define theplu_yat_omic_vcf_iterator
3774 26 Oct 18 peter 3
3774 26 Oct 18 peter 4 // $Id$
3774 26 Oct 18 peter 5
3774 26 Oct 18 peter 6 /*
3774 26 Oct 18 peter 7   Copyright (C) 2018 Peter Johansson
3774 26 Oct 18 peter 8
3774 26 Oct 18 peter 9   This file is part of the yat library, http://dev.thep.lu.se/yat
3774 26 Oct 18 peter 10
3774 26 Oct 18 peter 11   The yat library is free software; you can redistribute it and/or
3774 26 Oct 18 peter 12   modify it under the terms of the GNU General Public License as
3774 26 Oct 18 peter 13   published by the Free Software Foundation; either version 3 of the
3774 26 Oct 18 peter 14   License, or (at your option) any later version.
3774 26 Oct 18 peter 15
3774 26 Oct 18 peter 16   The yat library is distributed in the hope that it will be useful,
3774 26 Oct 18 peter 17   but WITHOUT ANY WARRANTY; without even the implied warranty of
3774 26 Oct 18 peter 18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3774 26 Oct 18 peter 19   General Public License for more details.
3774 26 Oct 18 peter 20
3774 26 Oct 18 peter 21   You should have received a copy of the GNU General Public License
3774 26 Oct 18 peter 22   along with yat. If not, see <http://www.gnu.org/licenses/>.
3774 26 Oct 18 peter 23 */
3774 26 Oct 18 peter 24
3774 26 Oct 18 peter 25 #include "VCF.h"
3774 26 Oct 18 peter 26
3774 26 Oct 18 peter 27 #include <iterator>
3774 26 Oct 18 peter 28
3774 26 Oct 18 peter 29 namespace theplu {
3774 26 Oct 18 peter 30 namespace yat {
3774 26 Oct 18 peter 31 namespace omic {
3774 26 Oct 18 peter 32
3774 26 Oct 18 peter 33   class VcfFile;
3774 26 Oct 18 peter 34
3774 26 Oct 18 peter 35   /**
3774 26 Oct 18 peter 36      This class is an input iterator, similar to
3774 26 Oct 18 peter 37      std::istream_iterator, associated with an VcfFile such that it
3774 26 Oct 18 peter 38      extracts a VCF from the VcfFile whenever \c operator++ is called.
3774 26 Oct 18 peter 39
3774 26 Oct 18 peter 40      \since new in yat 0.16
3774 26 Oct 18 peter 41    */
3774 26 Oct 18 peter 42   class VcfIterator : public std::istream_iterator<VCF>
3774 26 Oct 18 peter 43   {
3774 26 Oct 18 peter 44   public:
3774 26 Oct 18 peter 45     /**
3774 26 Oct 18 peter 46        Default constructor.
3774 26 Oct 18 peter 47
3774 26 Oct 18 peter 48        Creates an end-of-file iterator
3774 26 Oct 18 peter 49      */
3774 26 Oct 18 peter 50     VcfIterator(void);
3774 26 Oct 18 peter 51
3774 26 Oct 18 peter 52     /**
3774 26 Oct 18 peter 53        Construct an iterator that is associated with file \a file. The
3774 26 Oct 18 peter 54        object does not copy \a file but only stores a reference, so if
3774 26 Oct 18 peter 55        file goes out of scope the behaviour is undefined.
3774 26 Oct 18 peter 56      */
3774 26 Oct 18 peter 57     VcfIterator(VcfFile& file);
3774 26 Oct 18 peter 58
3774 26 Oct 18 peter 59   private:
3774 26 Oct 18 peter 60     // using compiler generated copy
3774 26 Oct 18 peter 61     // VcfIterator(const VcfIterator&);
3774 26 Oct 18 peter 62     // VcfIterator& operator=(const VcfIterator&);
3774 26 Oct 18 peter 63     // using compiler generated move
3774 26 Oct 18 peter 64     // VcfIterator(VcfIterator&&);
3774 26 Oct 18 peter 65     // VcfIterator& operator=(VcfIterator&&);
3774 26 Oct 18 peter 66   };
3774 26 Oct 18 peter 67
3774 26 Oct 18 peter 68 }}}
3774 26 Oct 18 peter 69 #endif