All Classes Namespaces Functions Pages
halGappedTopSegmentIterator.h
/*
* Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
*
* Released under the MIT license, see LICENSE.txt
*/
#ifndef _HALGAPPEDTOPSEGMENTITERATOR_H
#define _HALGAPPEDTOPSEGMENTITERATOR_H
#include <iostream>
#include "halDefs.h"
#include "halTopSegmentIterator.h"
#include "halGappedSegmentIterator.h"
namespace hal {
class GappedTopSegmentIterator : virtual public GappedSegmentIterator
{
public:
virtual GappedTopSegmentIteratorPtr copy() = 0;
virtual GappedTopSegmentIteratorConstPtr copy() const = 0;
virtual void copy(GappedTopSegmentIteratorConstPtr ts) const = 0;
virtual void toChild(GappedBottomSegmentIteratorConstPtr bs) const = 0;
virtual bool equals(GappedTopSegmentIteratorConstPtr other) const = 0;
virtual bool adjacentTo(GappedTopSegmentIteratorConstPtr other) const = 0;
virtual bool hasParent() const = 0;
virtual bool hasNextParalogy() const = 0;
virtual void toNextParalogy() const = 0;
virtual bool getParentReversed() const = 0;
virtual TopSegmentIteratorConstPtr getLeft() const = 0;
virtual TopSegmentIteratorConstPtr getRight() const = 0;
virtual void setLeft(TopSegmentIteratorConstPtr ts) const = 0;
virtual bool isCanonicalParalog() const = 0;
protected:
friend class counted_ptr<GappedTopSegmentIterator>;
friend class counted_ptr<const GappedTopSegmentIterator>;
virtual ~GappedTopSegmentIterator() = 0;
};
inline GappedTopSegmentIterator::~GappedTopSegmentIterator() {}
inline bool operator==(GappedTopSegmentIteratorConstPtr p1,
GappedTopSegmentIteratorConstPtr p2)
{
if (p1.get() == NULL || p2.get() == NULL)
{
return p1.get() == NULL && p2.get() == NULL;
}
return p1->equals(p2);
}
inline bool operator!=(GappedTopSegmentIteratorConstPtr p1,
GappedTopSegmentIteratorConstPtr p2)
{
return !(p1 == p2);
}
}
#endif
hal::GappedTopSegmentIterator::copy
virtual GappedTopSegmentIteratorPtr copy()=0
hal::GappedTopSegmentIterator::hasNextParalogy
virtual bool hasNextParalogy() const =0
hal::GappedTopSegmentIterator::setLeft
virtual void setLeft(TopSegmentIteratorConstPtr ts) const =0
hal::GappedTopSegmentIterator::equals
virtual bool equals(GappedTopSegmentIteratorConstPtr other) const =0
hal::GappedTopSegmentIterator::hasParent
virtual bool hasParent() const =0
hal::GappedTopSegmentIterator::isCanonicalParalog
virtual bool isCanonicalParalog() const =0
hal::GappedTopSegmentIterator::toNextParalogy
virtual void toNextParalogy() const =0
hal::GappedTopSegmentIterator::getLeft
virtual TopSegmentIteratorConstPtr getLeft() const =0
hal::GappedTopSegmentIterator::toChild
virtual void toChild(GappedBottomSegmentIteratorConstPtr bs) const =0
hal::GappedTopSegmentIterator
Definition: halGappedTopSegmentIterator.h:21
hal::GappedTopSegmentIterator::adjacentTo
virtual bool adjacentTo(GappedTopSegmentIteratorConstPtr other) const =0
hal::GappedTopSegmentIterator::getParentReversed
virtual bool getParentReversed() const =0
hal::GappedSegmentIterator
Definition: halGappedSegmentIterator.h:22
hal::GappedTopSegmentIterator::getRight
virtual TopSegmentIteratorConstPtr getRight() const =0