halapi hierarchichalalignmentformatapi

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Pages
halGappedTopSegmentIterator.h
1 /*
2 * Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
3 *
4 * Released under the MIT license, see LICENSE.txt
5 */
6
7 #ifndef _HALGAPPEDTOPSEGMENTITERATOR_H
8 #define _HALGAPPEDTOPSEGMENTITERATOR_H
9
10 #include <iostream>
11 #include "halDefs.h"
12 #include "halTopSegmentIterator.h"
13 #include "halGappedSegmentIterator.h"
14
15 namespace hal {
16
21 class GappedTopSegmentIterator : virtual public GappedSegmentIterator
22 {
23 public:
24
26 virtual GappedTopSegmentIteratorPtr copy() = 0;
27
29 virtual GappedTopSegmentIteratorConstPtr copy() const = 0;
30
33 virtual void copy(GappedTopSegmentIteratorConstPtr ts) const = 0;
34
37 virtual void toChild(GappedBottomSegmentIteratorConstPtr bs) const = 0;
38
41 virtual bool equals(GappedTopSegmentIteratorConstPtr other) const = 0;
42
44 virtual bool adjacentTo(GappedTopSegmentIteratorConstPtr other) const = 0;
45
47 virtual bool hasParent() const = 0;
48
50 virtual bool hasNextParalogy() const = 0;
51
53 virtual void toNextParalogy() const = 0;
54
56 virtual bool getParentReversed() const = 0;
57
61 virtual TopSegmentIteratorConstPtr getLeft() const = 0;
62
66 virtual TopSegmentIteratorConstPtr getRight() const = 0;
67
71 virtual void setLeft(TopSegmentIteratorConstPtr ts) const = 0;
72
78 virtual bool isCanonicalParalog() const = 0;
79
80 protected:
81 friend class counted_ptr<GappedTopSegmentIterator>;
82 friend class counted_ptr<const GappedTopSegmentIterator>;
83 virtual ~GappedTopSegmentIterator() = 0;
84 };
85
86 inline GappedTopSegmentIterator::~GappedTopSegmentIterator() {}
87
88 inline bool operator==(GappedTopSegmentIteratorConstPtr p1,
89 GappedTopSegmentIteratorConstPtr p2)
90 {
91 if (p1.get() == NULL || p2.get() == NULL)
92 {
93 return p1.get() == NULL && p2.get() == NULL;
94 }
95 return p1->equals(p2);
96 }
97
98 inline bool operator!=(GappedTopSegmentIteratorConstPtr p1,
99 GappedTopSegmentIteratorConstPtr p2)
100 {
101 return !(p1 == p2);
102 }
103
104 }
105
106 #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