#include <featuredata.h>
Inheritance diagram for DnpData:
Public Member Functions | |
DnpData () | |
DnpData (db_recno_t readRecno, TR_DNA startPos, TR_DNA endPos) | |
void | readDom (QDomElement &elem) |
std::string | uniqueName () |
TrDb::IndexMap | getIndexMap () |
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 | |
FeatureGui * | makeGui () |
FeatureInfo * | makeInfo () |
Protected Attributes | |
int | dnpID |
int | type |
Definition at line 94 of file featuredata.h.
|
Definition at line 97 of file featuredata.h. 00097 : FeatureData(), dnpID(-1) 00098 {}
|
|
Definition at line 152 of file featuredata.cpp. 00153 : FeatureData( readRecno, startPos, endPos ), dnpID(-1), type(-1) 00154 {}
|
|
Definition at line 103 of file featuredata.h.
|
|
Definition at line 214 of file featuredata.cpp. References type. 00215 { 00216 return type; 00217 }
|
|
Definition at line 204 of file featuredata.cpp. References dnpID. Referenced by DnpInfo::myInfoPos(), and DnpInfo::myInfoRange(). 00205 { 00206 return dnpID; 00207 }
|
|
Returns a TrDb::IndexMap that specifies which secondary indexes should be generated for stored data objects of this class in the Berkeley Db backend. Each record in the TrDb::IndexMap generates a secondary index built as a btree ( a DB_BTREE in Berkeley Db wording ). The secondary index is sorted which makes it possible to do queries like "Give me the object that has the smallest value, bigger or equal than x". And about speed performance, a quote from Berkeley Db documentation says: "Searches take O(log base_b N) time, where base_b is the average number of keys per page, and N is the total number of keys stored" Reimplemented from FeatureData. Definition at line 102 of file featuredata.h. References FeatureData::getIndexMap(). 00102 { return FeatureData::getIndexMap(); }
|
|
Implements FeatureData. Definition at line 116 of file featuredata.h. 00116 { return new DnpGui( this ); }
|
|
Reimplemented from FeatureData. Definition at line 117 of file featuredata.h. 00117 { return new DnpInfo( this ); }
|
|
Loads the state of this object from QXmlAttributes.This method is used for importing. Reimplemented from FeatureData. Definition at line 179 of file featuredata.cpp. References dnpID, FeatureData::readAttributes(), and type. 00180 { 00181 FeatureData::readAttributes( attr ); 00182 if ( attr.value("dnpID") != "" ) { 00183 dnpID = attr.value("dnpID").toInt(); 00184 } 00185 if ( attr.value("type") != "" ) { 00186 type = attr.value("type").toInt(); 00187 } 00188 00189 }
|
|
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 FeatureData. Definition at line 174 of file featuredata.cpp. References FeatureData::readDom(). 00175 { 00176 FeatureData::readDom( elem ); 00177 }
|
|
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 156 of file featuredata.cpp. References dnpID, FeatureData::readStream(), and type. 00157 { 00158 FeatureData::readStream( stream ); 00159 stream>>dnpID>>type; 00160 }
|
|
Definition at line 209 of file featuredata.cpp. References type. 00210 { 00211 type = t; 00212 }
|
|
Definition at line 199 of file featuredata.cpp. References dnpID. 00200 { 00201 dnpID = id; 00202 }
|
|
Specifies a name that uniquely should identify this class. It will be used for lookups in the GeneralMaker class. Implements GeneralData. Definition at line 101 of file featuredata.h.
|
|
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 FeatureData. Definition at line 168 of file featuredata.cpp. References FeatureData::writeDom(). 00169 { 00170 FeatureData::writeDom( elem ); 00171 elem.setAttribute("dnp", "11" ); 00172 }
|
|
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 162 of file featuredata.cpp. References dnpID, type, and FeatureData::writeStream(). 00163 { 00164 FeatureData::writeStream( str ); 00165 str<<dnpID<<type; 00166 }
|
|
Reimplemented from FeatureData. Definition at line 190 of file featuredata.cpp. References dnpID, type, and FeatureData::writeXml(). 00191 { 00192 FeatureData::writeXml(stream); 00193 stream<<" dnpID=\""<<dnpID<<"\"" 00194 <<" type=\""<<type<<"\""; 00195 stream<<"/>\n"; 00196 }
|
|
Definition at line 118 of file featuredata.h. Referenced by get_dnpID(), readAttributes(), readStream(), set_dnpID(), writeStream(), and writeXml(). |
|
Definition at line 119 of file featuredata.h. Referenced by get_dnp_type(), readAttributes(), readStream(), set_dnp_type(), writeStream(), and writeXml(). |