DnpData Class Reference

A "dnp", i.e. a defined nucleotype position. More...

#include <featuredata.h>

Inheritance diagram for DnpData:

Inheritance graph
[legend]
Collaboration diagram for DnpData:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DnpData ()
 DnpData (db_recno_t readRecno, TR_DNA startPos, TR_DNA endPos)
void readDom (QDomElement &elem)
std::string uniqueName ()
virtual ~DnpData ()
void readStream (QDataStream &str)
void writeStream (QDataStream &str)
void writeDom (QDomElement &elem)
void readAttributes (const QXmlAttributes &attr)
void writeXml (ostream &stream)
void set_dnpID (int id)
int get_dnpID ()
void set_dnp_type (int t)
int get_dnp_type ()
 DnpData ()
 DnpData (db_recno_t readRecno, TR_DNA startPos, TR_DNA endPos)
void readDom (QDomElement &elem)
std::string uniqueName ()
virtual ~DnpData ()
void readStream (QDataStream &str)
void writeStream (QDataStream &str)
void writeDom (QDomElement &elem)
void readAttributes (const QXmlAttributes &attr)
void writeXml (ostream &stream)
void set_dnpID (int id)
int get_dnpID ()
void set_dnp_type (int t)
int get_dnp_type ()

Protected Member Functions

FeatureGuimakeGui ()
FeatureInfomakeInfo ()
FeatureGuimakeGui ()
FeatureInfomakeInfo ()

Protected Attributes

int dnpID
int type

Detailed Description

A "dnp", i.e. a defined nucleotype position.

Definition at line 111 of file featuredata.h.


Constructor & Destructor Documentation

DnpData::DnpData (  )  [inline]

Definition at line 114 of file featuredata.h.

00114              : SpatialFeatureData(), dnpID(-1)
00115   {}

DnpData::DnpData ( db_recno_t  readRecno,
TR_DNA  startPos,
TR_DNA  endPos 
)

Definition at line 188 of file featuredata.cpp.

00189   : SpatialFeatureData( readRecno, startPos, endPos ), dnpID(-1), type(-1)
00190 {}

virtual DnpData::~DnpData (  )  [inline, virtual]

Definition at line 120 of file featuredata.h.

00121   {}

DnpData::DnpData (  )  [inline]

Definition at line 95 of file spatialfeaturedata.h.

00095              : FeatureData(), dnpID(-1)
00096   {}

DnpData::DnpData ( db_recno_t  readRecno,
TR_DNA  startPos,
TR_DNA  endPos 
)

virtual DnpData::~DnpData (  )  [inline, virtual]

Definition at line 101 of file spatialfeaturedata.h.

00102   {}


Member Function Documentation

void DnpData::readDom ( QDomElement elem  )  [virtual]

Loads the state of this object from a dom tree. Or in other words reads in the values of the data members of this class from a dom tree underneath the QDomElement elem. This method is used for importing.

Reimplemented from GeneralData.

Definition at line 210 of file featuredata.cpp.

References GeneralData::readDom().

00211 {
00212     SpatialFeatureData::readDom( elem );
00213 }

std::string DnpData::uniqueName (  )  [inline, virtual]

Specifies a name that uniquely should identify this class. It will be used for lookups in the GeneralMaker class.

Implements GeneralData.

Definition at line 118 of file featuredata.h.

00118 { return std::string("DnpData"); }

void DnpData::readStream ( QDataStream str  )  [virtual]

Loads the state of this object from a byte stream. Or in other words reads and unserializes a byte stream to set the values of this class object. This method is used for loading a GeneralData object from Berkeley Db.

Reimplemented from FeatureData.

Definition at line 192 of file featuredata.cpp.

References dnpID, SpatialFeatureData::readStream(), and type.

00193 {
00194   SpatialFeatureData::readStream( stream );
00195   stream>>dnpID>>type;
00196 }

void DnpData::writeStream ( QDataStream str  )  [virtual]

Saves the state of this object to a byte stream. Or in other words serializes and writes the internal data held in this class object to a byte stream. This method is used for storing a GeneralData object into Berkeley Db.

Reimplemented from FeatureData.

Definition at line 198 of file featuredata.cpp.

References dnpID, type, and SpatialFeatureData::writeStream().

00199 {
00200     SpatialFeatureData::writeStream( str );
00201     str<<dnpID<<type;
00202 }

void DnpData::writeDom ( QDomElement elem  )  [virtual]

Saves the state of this object to a dom tree. Or in other words writes out the internal data held in this class to a dom tree underneath the QDomElement elem. This method is used for exporting.

Reimplemented from GeneralData.

Definition at line 204 of file featuredata.cpp.

References QDomElement::setAttribute(), and GeneralData::writeDom().

00205 {
00206     SpatialFeatureData::writeDom( elem );
00207     elem.setAttribute("dnp", "11" );
00208 }

void DnpData::readAttributes ( const QXmlAttributes attr  )  [virtual]

Loads the state of this object from QXmlAttributes.This method is used for importing.

Reimplemented from FeatureData.

Definition at line 215 of file featuredata.cpp.

References dnpID, SpatialFeatureData::readAttributes(), type, and QXmlAttributes::value().

00216 {
00217     SpatialFeatureData::readAttributes( attr );
00218     if ( attr.value("dnpID") != "" ) {
00219       dnpID = attr.value("dnpID").toInt();
00220     }
00221     if ( attr.value("type") != "" ) {
00222       type = attr.value("type").toInt();
00223     }
00224     
00225 }

void DnpData::writeXml ( ostream &  stream  )  [virtual]

Reimplemented from FeatureData.

Definition at line 226 of file featuredata.cpp.

References dnpID, type, and SpatialFeatureData::writeXml().

00227 {
00228   SpatialFeatureData::writeXml(stream);
00229   stream<<" dnpID=\""<<dnpID<<"\""
00230         <<" type=\""<<type<<"\"";
00231   stream<<"/>\n";
00232 }

void DnpData::set_dnpID ( int  id  ) 

Definition at line 235 of file featuredata.cpp.

References dnpID.

00236 {
00237   dnpID = id;
00238 }

int DnpData::get_dnpID (  ) 

Definition at line 240 of file featuredata.cpp.

References dnpID.

Referenced by DnpInfo::myInfoPos(), and DnpInfo::myInfoRange().

00241 {
00242   return dnpID;
00243 }

void DnpData::set_dnp_type ( int  t  ) 

Definition at line 245 of file featuredata.cpp.

References type.

00246 {
00247   type = t;
00248 }

int DnpData::get_dnp_type (  ) 

Definition at line 250 of file featuredata.cpp.

References type.

00251 {
00252   return type;
00253 }

FeatureGui* DnpData::makeGui (  )  [inline, protected, virtual]

Implements FeatureData.

Definition at line 133 of file featuredata.h.

00133 { return new DnpGui( this ); }

FeatureInfo* DnpData::makeInfo (  )  [inline, protected, virtual]

Implements FeatureData.

Definition at line 134 of file featuredata.h.

00134 { return new DnpInfo( this ); }

void DnpData::readDom ( QDomElement elem  )  [virtual]

Loads the state of this object from a dom tree. Or in other words reads in the values of the data members of this class from a dom tree underneath the QDomElement elem. This method is used for importing.

Reimplemented from GeneralData.

std::string DnpData::uniqueName (  )  [inline, virtual]

Specifies a name that uniquely should identify this class. It will be used for lookups in the GeneralMaker class.

Implements GeneralData.

Definition at line 99 of file spatialfeaturedata.h.

00099 { return std::string("DnpData"); }

void DnpData::readStream ( QDataStream str  )  [virtual]

Loads the state of this object from a byte stream. Or in other words reads and unserializes a byte stream to set the values of this class object. This method is used for loading a GeneralData object from Berkeley Db.

Reimplemented from FeatureData.

void DnpData::writeStream ( QDataStream str  )  [virtual]

Saves the state of this object to a byte stream. Or in other words serializes and writes the internal data held in this class object to a byte stream. This method is used for storing a GeneralData object into Berkeley Db.

Reimplemented from FeatureData.

void DnpData::writeDom ( QDomElement elem  )  [virtual]

Saves the state of this object to a dom tree. Or in other words writes out the internal data held in this class to a dom tree underneath the QDomElement elem. This method is used for exporting.

Reimplemented from GeneralData.

void DnpData::readAttributes ( const QXmlAttributes attr  )  [virtual]

Loads the state of this object from QXmlAttributes.This method is used for importing.

Reimplemented from FeatureData.

void DnpData::writeXml ( ostream &  stream  )  [virtual]

Reimplemented from FeatureData.

void DnpData::set_dnpID ( int  id  ) 

int DnpData::get_dnpID (  ) 

void DnpData::set_dnp_type ( int  t  ) 

int DnpData::get_dnp_type (  ) 

FeatureGui* DnpData::makeGui (  )  [inline, protected, virtual]

Implements FeatureData.

Definition at line 114 of file spatialfeaturedata.h.

00114 { return new DnpGui( this ); }

FeatureInfo* DnpData::makeInfo (  )  [inline, protected, virtual]

Implements FeatureData.

Definition at line 115 of file spatialfeaturedata.h.

00115 { return new DnpInfo( this ); }


Member Data Documentation

int DnpData::dnpID [protected]

Definition at line 135 of file featuredata.h.

Referenced by get_dnpID(), readAttributes(), readStream(), set_dnpID(), writeStream(), and writeXml().

int DnpData::type [protected]

Definition at line 136 of file featuredata.h.

Referenced by get_dnp_type(), readAttributes(), readStream(), set_dnp_type(), writeStream(), and writeXml().


The documentation for this class was generated from the following files:
Generated on Fri Jul 17 20:19:46 2009 for ngsview by  doxygen 1.5.1