#include <featureinfo.h>
Inheritance diagram for DnpInfo:
Public Member Functions | |
DnpInfo (SpatialFeatureData *data) | |
std::string | myInfoPos (TR_DNA pos) |
std::string | myInfoRange (TR_DNA begin, TR_DNA end) |
Private Member Functions | |
DnpData * | dnpData () |
Definition at line 38 of file featureinfo.h.
DnpInfo::DnpInfo | ( | SpatialFeatureData * | data | ) | [inline] |
std::string DnpInfo::myInfoPos | ( | TR_DNA | pos | ) | [virtual] |
Reimplemented from FeatureInfo.
Definition at line 33 of file featureinfo.cc.
References dnpData(), and DnpData::get_dnpID().
00034 { 00035 assert( pos == dnpData()->startPos() ); 00036 assert( pos == dnpData()->endPos() ); 00037 00038 ostringstream os; 00039 00040 os<<"SNP ID: "<<dnpData()->get_dnpID(); 00041 00042 return os.str(); 00043 }
std::string DnpInfo::myInfoRange | ( | TR_DNA | begin, | |
TR_DNA | end | |||
) | [virtual] |
Reimplemented from FeatureInfo.
Definition at line 45 of file featureinfo.cc.
References dnpData(), DnpData::get_dnpID(), and FeatureData::startPos().
00046 { 00047 //Sanity check 00048 assert( dnpData()->startPos() == dnpData()->endPos() ); 00049 ostringstream os; 00050 os.str(""); 00051 if ( dnpData()->startPos() >= begin && dnpData()->startPos() <= end) { 00052 os<<"SNP ID: "<<dnpData()->get_dnpID()<<" at pos "<<dnpData()->startPos(); 00053 00054 } 00055 00056 return os.str(); 00057 }
DnpData * DnpInfo::dnpData | ( | ) | [private] |
Definition at line 59 of file featureinfo.cc.
References FeatureInfo::m_data.
Referenced by myInfoPos(), and myInfoRange().
00060 { 00061 return dynamic_cast<DnpData *>( m_data ); 00062 }