multovl  1.3
Multiple overlaps of genomic regions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Friends | List of all members
multovl::RegLimit Class Reference

#include "reglimit.hh"

Public Member Functions

 RegLimit ()
 Init to empty.
 
 RegLimit (const boost::shared_ptr< AncestorRegion > &regp, bool isfirst=true)
 
const AncestorRegionregion () const
 
bool is_first () const
 
void first (bool isfirst)
 Sets the first attribute of the calling object.
 
unsigned int track_id () const
 
unsigned int this_pos () const
 
unsigned int other_pos () const
 
bool operator< (const RegLimit &other) const
 Ordering according to position, or first before last if the same position.
 
RegLimit deep_copy () const
 
const AncestorRegionconst_raw_region_ptr () const
 
AncestorRegionraw_region_ptr ()
 

Friends

class boost::serialization::access
 

Detailed Description

Each ancestor region to be overlapped is stored twice in MultiRegion's lookup; once as a "first pos", and once as a "last pos". The RegLimit class implements these "region limit" objects. It can also be serialized.

Constructor & Destructor Documentation

multovl::RegLimit::RegLimit ( const boost::shared_ptr< AncestorRegion > &  regp,
bool  isfirst = true 
)
inlineexplicit

Init with a shared pointer to an ancestor region

Parameters
regpshared pointer to an ancestor region, usually created with boost::make_shared
isfirsttrue if first position, false if last

Member Function Documentation

RegLimit multovl::RegLimit::deep_copy ( ) const
inline

Deep copy operation. The default copy ctor returns a shallow copy in the sense that only the internal shared pointer is copied but not the AncestorRegion it is pointing to, as it is to be expected from a boost::shared_ptr.

Returns
a new RegLimit object whose internal shared pointer points to a completely separate copy of the AncestorRegion.
bool multovl::RegLimit::is_first ( ) const
inline
Returns
/true/ if this limit is the "first" coordinate of the underlying AncestorRegion.
unsigned int multovl::RegLimit::other_pos ( ) const
inline
Returns
the "other" position of the calling object, depending on is_first(). If is_first() == true, then the last position is returned, otherwise the first is returned.
const AncestorRegion& multovl::RegLimit::region ( ) const
inline
Returns
the AncestorRegion underlying this RegLimit.
unsigned int multovl::RegLimit::this_pos ( ) const
inline
Returns
the position of the calling object, depending on is_first(). If is_first() == true, then the first position is returned, otherwise the last is returned.

The documentation for this class was generated from the following file: