All Classes Namespaces Functions Pages
halSlicedSegment.h
/*
* Copyright (C) 2013 by Glenn Hickey (hickey@soe.ucsc.edu)
*
* Released under the MIT license, see LICENSE.txt
*/
#ifndef _HALSLICEDSEGMENT_H
#define _HALSLICEDSEGMENT_H
#include "halDefs.h"
#include "halSegment.h"
namespace hal {
class MappedSegment;
class SlicedSegment : public virtual Segment
{
public:
virtual void toReverse() const = 0;
virtual void toReverseInPlace() const = 0;
virtual hal_offset_t getStartOffset() const = 0;
virtual hal_offset_t getEndOffset() const = 0;
virtual void slice(hal_offset_t startOffset = 0,
hal_offset_t endOffset = 0) const = 0;
virtual bool getReversed() const = 0;
protected:
friend class counted_ptr<SlicedSegment>;
friend class counted_ptr<const SlicedSegment>;
virtual ~SlicedSegment() = 0;
};
inline SlicedSegment::~SlicedSegment() {}
inline bool operator<(SlicedSegmentConstPtr segmentIt,
hal_index_t genomePos)
{
return segmentIt->leftOf(genomePos);
}
inline bool operator>(SlicedSegmentConstPtr segmentIt,
hal_index_t genomePos)
{
return segmentIt->rightOf(genomePos);
}
}
#endif
hal::Segment
Definition: halSegment.h:21
hal::SlicedSegment::getEndOffset
virtual hal_offset_t getEndOffset() const =0
hal::SlicedSegment::getReversed
virtual bool getReversed() const =0
hal::SlicedSegment::getStartOffset
virtual hal_offset_t getStartOffset() const =0
hal::SlicedSegment::toReverseInPlace
virtual void toReverseInPlace() const =0
hal::SlicedSegment::toReverse
virtual void toReverse() const =0
hal::SlicedSegment
Definition: halSlicedSegment.h:22
hal::SlicedSegment::slice
virtual void slice(hal_offset_t startOffset=0, hal_offset_t endOffset=0) const =0