halapi hierarchichalalignmentformatapi

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Pages
halGappedBottomSegmentIterator.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 _HALGAPPEDBOTTOMSEGMENTITERATOR_H
8 #define _HALGAPPEDBOTTOMSEGMENTITERATOR_H
9
10 #include <iostream>
11 #include "halDefs.h"
12 #include "halBottomSegmentIterator.h"
13 #include "halGappedSegmentIterator.h"
14
15 namespace hal {
16
21 class GappedBottomSegmentIterator : virtual public GappedSegmentIterator
22 {
23 public:
24
26 virtual GappedBottomSegmentIteratorPtr copy() = 0;
27
29 virtual GappedBottomSegmentIteratorConstPtr copy() const = 0;
30
33 virtual void copy(GappedBottomSegmentIteratorConstPtr ts) const = 0;
34
36 virtual void toParent(GappedTopSegmentIteratorConstPtr ts) const = 0;
37
40 virtual bool equals(GappedBottomSegmentIteratorConstPtr other) const = 0;
41
43 virtual bool adjacentTo(GappedBottomSegmentIteratorConstPtr other) const= 0;
44
46 virtual bool hasChild() const = 0;
47
49 virtual bool getChildReversed() const = 0;
50
54 virtual BottomSegmentIteratorConstPtr getLeft() const = 0;
55
59 virtual BottomSegmentIteratorConstPtr getRight() const = 0;
60
64 virtual void setLeft(BottomSegmentIteratorConstPtr bs) const = 0;
65
66
67 protected:
68 friend class counted_ptr<GappedBottomSegmentIterator>;
69 friend class counted_ptr<const GappedBottomSegmentIterator>;
70 virtual ~GappedBottomSegmentIterator() = 0;
71 };
72
73 inline GappedBottomSegmentIterator::~GappedBottomSegmentIterator() {}
74
75 inline bool operator==(GappedBottomSegmentIteratorConstPtr p1,
76 GappedBottomSegmentIteratorConstPtr p2)
77 {
78 if (p1.get() == NULL || p2.get() == NULL)
79 {
80 return p1.get() == NULL && p2.get() == NULL;
81 }
82 return p1->equals(p2);
83 }
84
85 inline bool operator!=(GappedBottomSegmentIteratorConstPtr p1,
86 GappedBottomSegmentIteratorConstPtr p2)
87 {
88 return !(p1 == p2);
89 }
90
91 }
92
93
94 #endif
hal::GappedBottomSegmentIterator::setLeft
virtual void setLeft(BottomSegmentIteratorConstPtr bs) const =0
hal::GappedBottomSegmentIterator::hasChild
virtual bool hasChild() const =0
hal::GappedBottomSegmentIterator::getChildReversed
virtual bool getChildReversed() const =0
hal::GappedBottomSegmentIterator::getLeft
virtual BottomSegmentIteratorConstPtr getLeft() const =0
hal::GappedBottomSegmentIterator::equals
virtual bool equals(GappedBottomSegmentIteratorConstPtr other) const =0
hal::GappedBottomSegmentIterator
Definition: halGappedBottomSegmentIterator.h:21
hal::GappedBottomSegmentIterator::getRight
virtual BottomSegmentIteratorConstPtr getRight() const =0
hal::GappedBottomSegmentIterator::toParent
virtual void toParent(GappedTopSegmentIteratorConstPtr ts) const =0
hal::GappedBottomSegmentIterator::adjacentTo
virtual bool adjacentTo(GappedBottomSegmentIteratorConstPtr other) const =0
hal::GappedSegmentIterator
Definition: halGappedSegmentIterator.h:22
hal::GappedBottomSegmentIterator::copy
virtual GappedBottomSegmentIteratorPtr copy()=0