コード例 #1
0
/** If button is checked (first press), do nothing, except
  * change button icon to show remove in progress.
  * If button is unchecked (second press), remove data.
  */
void EraseDataToolButton::requestEraseData()
{
	this->setRemoveIcon();

	if (mRemoveAction->isChecked())
		return;

	emit eraseData();
}
コード例 #2
0
ファイル: preprocessDB.cpp プロジェクト: masayano/CLAST
void readFASTA(
		const std::string& inPath,
		const std::string& outPath,
		const int maxLength,
		const int overlapLength) {
	std::ifstream ifs(inPath.c_str());
	std::string buf;

	std::string label;
	std::string sequence;
	while(ifs && std::getline(ifs, buf)) {
		if(buf.find(">") != std::string::npos) {
			if(!label.empty()) {
				splitFASTA(label, sequence, outPath, maxLength, overlapLength);
				eraseData(label, sequence);
			}
			label = buf;
		} else if(buf.empty()) {
			if(!label.empty()) {
				splitFASTA(label, sequence, outPath, maxLength, overlapLength);
				eraseData(label, sequence);
			}
		} else {
			if(!label.empty()) {
				removeSpace(buf);
				sequence += buf;
			}
		}
 	}
	if(ifs.eof()) {
		if(!label.empty()) {
			splitFASTA(label, sequence, outPath, maxLength, overlapLength);
			eraseData(label, sequence);
		}
	}
}
コード例 #3
0
ファイル: Rom.cpp プロジェクト: PhantomDevil/LvASMtool
int Rom::eraseData(int addr,int size) {
	return eraseData(addr,size,false);
}
コード例 #4
0
ファイル: Rom.cpp プロジェクト: PhantomDevil/LvASMtool
int Rom::eraseRATSdata(int addr) {
	int size = checkRATSdata(addr);
	if(size <= 0) return 0;
	eraseData(addr,size+8,true);
	return size+8;
}