#include <featuredata.h>
Inheritance diagram for ChromatData:
Public Member Functions | |
ChromatData () | |
ChromatData (db_recno_t readRecno, TR_DNA startPos, TR_DNA endPos) | |
std::string | uniqueName () |
virtual | ~ChromatData () |
void | readStream (QDataStream &str) |
void | writeStream (QDataStream &str) |
void | writeDom (QDomElement &elem) |
void | readDom (QDomElement &elem) |
void | readAttributes (const QXmlAttributes &attr) |
void | writeXml (ostream &stream) |
ChromatData () | |
ChromatData (db_recno_t readRecno, TR_DNA startPos, TR_DNA endPos) | |
std::string | uniqueName () |
virtual | ~ChromatData () |
void | readStream (QDataStream &str) |
void | writeStream (QDataStream &str) |
void | writeDom (QDomElement &elem) |
void | readDom (QDomElement &elem) |
void | readAttributes (const QXmlAttributes &attr) |
void | writeXml (ostream &stream) |
Public Attributes | |
std::vector< TrapperVector< Q_UINT32 > > | cagt_vec |
TrapperVector< Q_UINT32 > | phd_vec |
TrapperVector< Q_UINT32 > | gap_vec |
std::vector< TrapperVector< Q_UINT32 > > | cagt_vec |
TrapperVector< Q_UINT32 > | phd_vec |
TrapperVector< Q_UINT32 > | gap_vec |
Protected Member Functions | |
FeatureGui * | makeGui () |
FeatureGui * | makeGui () |
Definition at line 164 of file featuredata.h.
ChromatData::ChromatData | ( | ) | [inline] |
ChromatData::ChromatData | ( | db_recno_t | readRecno, | |
TR_DNA | startPos, | |||
TR_DNA | endPos | |||
) |
Definition at line 347 of file featuredata.cpp.
00347 : 00348 SpatialFeatureData( readRecno, startPos, endPos ), cagt_vec(4) 00349 {}
virtual ChromatData::~ChromatData | ( | ) | [inline, virtual] |
ChromatData::ChromatData | ( | ) | [inline] |
ChromatData::ChromatData | ( | db_recno_t | readRecno, | |
TR_DNA | startPos, | |||
TR_DNA | endPos | |||
) |
virtual ChromatData::~ChromatData | ( | ) | [inline, virtual] |
std::string ChromatData::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 170 of file featuredata.h.
void ChromatData::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 351 of file featuredata.cpp.
References cagt_vec, gap_vec, phd_vec, and SpatialFeatureData::readStream().
00352 { 00353 SpatialFeatureData::readStream( str ); 00354 for( size_t i = 0; i < 4; i++ ) { 00355 str>>cagt_vec[i]; 00356 } 00357 str>>phd_vec; 00358 str>>gap_vec; 00359 }
void ChromatData::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 361 of file featuredata.cpp.
References cagt_vec, gap_vec, phd_vec, and SpatialFeatureData::writeStream().
00362 { 00363 SpatialFeatureData::writeStream( str ); 00364 for( size_t i = 0; i < 4; i++ ) { 00365 str<<cagt_vec[i]; 00366 } 00367 str<<phd_vec; 00368 str<<gap_vec; 00369 }
void ChromatData::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 371 of file featuredata.cpp.
References QDomElement::setAttribute(), and GeneralData::writeDom().
00372 { 00373 SpatialFeatureData::writeDom( elem ); 00374 elem.setAttribute("cc", "11" ); 00375 }
void ChromatData::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 377 of file featuredata.cpp.
References GeneralData::readDom().
00378 { 00379 SpatialFeatureData::readDom( elem ); 00380 // tVector.readDom( elem ); 00381 }
void ChromatData::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 382 of file featuredata.cpp.
References cagt_vec, gap_vec, phd_vec, SpatialFeatureData::readAttributes(), TrapperVector< T >::readString(), and QXmlAttributes::value().
Referenced by MacsimParser::endElement().
00383 { 00384 SpatialFeatureData::readAttributes(attr); 00385 //Order is c, a, g, t 00386 if ( attr.value("c_vector") != "" ) { 00387 QString str = attr.value("c_vector"); 00388 cagt_vec[0].readString(str); 00389 00390 } 00391 if ( attr.value("a_vector") != "" ) { 00392 QString str = attr.value("a_vector"); 00393 cagt_vec[1].readString(str); 00394 00395 } 00396 if ( attr.value("g_vector") != "" ) { 00397 QString str = attr.value("g_vector"); 00398 cagt_vec[2].readString(str); 00399 00400 } 00401 if ( attr.value("t_vector") != "" ) { 00402 QString str = attr.value("t_vector"); 00403 cagt_vec[3].readString(str); 00404 00405 } 00406 if ( attr.value("phd") != "" ) { 00407 QString str = attr.value("phd"); 00408 phd_vec.readString(str); 00409 00410 } 00411 if ( attr.value("gap") != "" ) { 00412 QString str = attr.value("gap"); 00413 gap_vec.readString(str); 00414 00415 } 00416 00417 }
void ChromatData::writeXml | ( | ostream & | stream | ) | [virtual] |
Reimplemented from FeatureData.
Definition at line 418 of file featuredata.cpp.
References cagt_vec, gap_vec, phd_vec, TrapperVector< T >::stlVector(), and SpatialFeatureData::writeXml().
00419 { 00420 SpatialFeatureData::writeXml(stream); 00421 if ( cagt_vec[0].stlVector().size() > 0 ) { 00422 stream<<" c_vector=\""; 00423 for( size_t i = 0; i < cagt_vec[0].stlVector().size(); i++ ) { 00424 stream<<' '<<cagt_vec[0].stlVector()[i]; 00425 } 00426 stream<<"\""; 00427 } 00428 if ( cagt_vec[1].stlVector().size() > 0 ) { 00429 stream<<" a_vector=\""; 00430 for( size_t i = 0; i < cagt_vec[1].stlVector().size(); i++ ) { 00431 stream<<' '<<cagt_vec[1].stlVector()[i]; 00432 } 00433 stream<<"\""; 00434 } 00435 if ( cagt_vec[2].stlVector().size() > 0 ) { 00436 stream<<" g_vector=\""; 00437 for( size_t i = 0; i < cagt_vec[2].stlVector().size(); i++ ) { 00438 stream<<' '<<cagt_vec[2].stlVector()[i]; 00439 } 00440 stream<<"\""; 00441 } 00442 if ( cagt_vec[3].stlVector().size() > 0 ) { 00443 stream<<" t_vector=\""; 00444 for( size_t i = 0; i < cagt_vec[3].stlVector().size(); i++ ) { 00445 stream<<' '<<cagt_vec[3].stlVector()[i]; 00446 } 00447 stream<<"\""; 00448 } 00449 if ( phd_vec.stlVector().size() > 0 ) { 00450 stream<<" phd=\""; 00451 for( size_t i = 0; i < phd_vec.stlVector().size(); i++ ) { 00452 stream<<' '<<phd_vec.stlVector()[i]; 00453 } 00454 stream<<"\""; 00455 } 00456 if ( gap_vec.stlVector().size() > 0 ) { 00457 stream<<" gap=\""; 00458 for( size_t i = 0; i < gap_vec.stlVector().size(); i++ ) { 00459 stream<<' '<<gap_vec.stlVector()[i]; 00460 } 00461 stream<<"\""; 00462 } 00463 00464 stream<<"/>\n"; 00465 }
FeatureGui* ChromatData::makeGui | ( | ) | [inline, protected, virtual] |
Implements FeatureData.
Definition at line 185 of file featuredata.h.
00185 { return new ChromatGui(this); }
std::string ChromatData::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 151 of file spatialfeaturedata.h.
void ChromatData::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 ChromatData::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 ChromatData::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 ChromatData::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.
void ChromatData::readAttributes | ( | const QXmlAttributes & | attr | ) | [virtual] |
Loads the state of this object from QXmlAttributes.This method is used for importing.
Reimplemented from FeatureData.
void ChromatData::writeXml | ( | ostream & | stream | ) | [virtual] |
Reimplemented from FeatureData.
FeatureGui* ChromatData::makeGui | ( | ) | [inline, protected, virtual] |
Implements FeatureData.
Definition at line 166 of file spatialfeaturedata.h.
00166 { return new ChromatGui(this); }
std::vector<TrapperVector<Q_UINT32> > ChromatData::cagt_vec |
Definition at line 180 of file featuredata.h.
Referenced by TrapperDoc::importChromat(), TrapperDoc::importPhd(), ChromatGui::paintMe(), readAttributes(), readStream(), writeStream(), and writeXml().
TrapperVector<Q_UINT32> ChromatData::phd_vec |
Definition at line 181 of file featuredata.h.
Referenced by TrapperDoc::importPhd(), ChromatGui::paintMe(), readAttributes(), readStream(), writeStream(), and writeXml().
TrapperVector<Q_UINT32> ChromatData::gap_vec |
Definition at line 182 of file featuredata.h.
Referenced by TrapperDoc::importPhd(), ChromatGui::paintMe(), readAttributes(), readStream(), writeStream(), and writeXml().
std::vector<TrapperVector<Q_UINT32> > ChromatData::cagt_vec |
Definition at line 161 of file spatialfeaturedata.h.
TrapperVector<Q_UINT32> ChromatData::phd_vec |
Definition at line 162 of file spatialfeaturedata.h.
TrapperVector<Q_UINT32> ChromatData::gap_vec |
Definition at line 163 of file spatialfeaturedata.h.