All Classes Namespaces Functions Pages
halBottomSegmentIterator.h
/*
* Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
*
* Released under the MIT license, see LICENSE.txt
*/
#ifndef _HALBOTTOMSEGMENTITERATOR_H
#define _HALBOTTOMSEGMENTITERATOR_H
#include "halDefs.h"
#include "halBottomSegment.h"
#include "halSegmentIterator.h"
namespace hal {
class BottomSegmentIterator : public virtual BottomSegment,
public virtual SegmentIterator
{
public:
virtual BottomSegmentIteratorPtr copy() = 0;
virtual BottomSegmentIteratorConstPtr copy() const = 0;
virtual void copy(BottomSegmentIteratorConstPtr bs) const = 0;
virtual void toParent(TopSegmentIteratorConstPtr ts) const = 0;
virtual void toParseDown(TopSegmentIteratorConstPtr ts) const = 0;
virtual BottomSegment* getBottomSegment() = 0;
virtual const BottomSegment* getBottomSegment() const = 0;
virtual bool equals(BottomSegmentIteratorConstPtr other) const = 0;
protected:
friend class counted_ptr<BottomSegmentIterator>;
friend class counted_ptr<const BottomSegmentIterator>;
virtual ~BottomSegmentIterator() = 0;
};
inline BottomSegmentIterator::~BottomSegmentIterator() {}
inline bool operator==(BottomSegmentIteratorConstPtr p1,
BottomSegmentIteratorConstPtr p2)
{
if (p1.get() == NULL || p2.get() == NULL)
{
return p1.get() == NULL && p2.get() == NULL;
}
return p1->equals(p2);
}
inline bool operator!=(BottomSegmentIteratorConstPtr p1,
BottomSegmentIteratorConstPtr p2)
{
return !(p1 == p2);
}
}
#endif
hal::BottomSegment
Definition: halBottomSegment.h:18
hal::BottomSegmentIterator
Definition: halBottomSegmentIterator.h:21
hal::BottomSegmentIterator::toParseDown
virtual void toParseDown(TopSegmentIteratorConstPtr ts) const =0
hal::BottomSegmentIterator::getBottomSegment
virtual BottomSegment * getBottomSegment()=0
hal::SegmentIterator
Definition: halSegmentIterator.h:20
hal::BottomSegmentIterator::equals
virtual bool equals(BottomSegmentIteratorConstPtr other) const =0
hal::BottomSegmentIterator::toParent
virtual void toParent(TopSegmentIteratorConstPtr ts) const =0
hal::BottomSegmentIterator::copy
virtual BottomSegmentIteratorPtr copy()=0