本文整理汇总了C++中QuickString类的典型用法代码示例。如果您正苦于以下问题:C++ QuickString类的具体用法?C++ QuickString怎么用?C++ QuickString使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QuickString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printNull
void GffRecord::printNull(QuickString &outBuf) const
{
outBuf.append(".\t.\t.\t-1\t-1\t.\t.\t.", 17);
if (_numFields > 8) {
outBuf.append("\t.", 2);
}
}
示例2: getLine
bool BufferedStreamMgr::getLine(QuickString &line)
{
line.clear();
if (_mainBufCurrStartPos >= _mainBufCurrLen) {
if (!readFileChunk()) {
_eof = true;
return false;
}
}
while (1) {
int searchPos = _mainBufCurrStartPos;
while (searchPos < _mainBufCurrLen && _mainBuf[searchPos] != '\n') {
searchPos++;
}
line.append((char *)_mainBuf + _mainBufCurrStartPos, searchPos - _mainBufCurrStartPos);
_mainBufCurrStartPos = searchPos +1;
if (searchPos == _mainBufCurrLen) { //hit end of buffer, but no newline yet
if (!readFileChunk()) { //hit eof
return true;
}
} else if (_mainBuf[searchPos] == '\n') {
return true;
}
}
}
示例3: size
OneStringBase& QuickString<quickSize>::substr(int pos, int sublen)
{
// Check sublen flag. If -1, then go to the end of the QuickString
if(sublen == -1)
{
// Calculate the size from the position to the end of the QuickString
sublen = size() - pos;
}
// Check for valid index
if((pos >= quickSize) || (pos < 0))
{
ioc << cat_error << ta_bold << fg_red << "QuickString Error:" <<
" Index Out of Bounds" << io_end;
return *this;
}
// If the substring size is too large throw an error
else if(sublen + pos > size())
{
ioc << cat_error << ta_bold << fg_red << "QuickString Error: " <<
"Size exceeds limits of QuickString"<<io_end;
return *this;
}
else
{
// Create a new OneString and append each character that is found
// in the substring
QuickString<quickSize>* newPaw = new QuickString();
for(int i = 0; i < sublen; i++)
{
newPaw->append(master[pos]);
pos++;
}
return *newPaw;
}
}
示例4: print
void VcfRecord::print(QuickString &outBuf, const QuickString & start, const QuickString & end) const {
outBuf.append(_chrName);
outBuf.append('\t');
outBuf.append(_startPosStr);
printOtherFields(outBuf);
}
示例5:
void Bed3Interval::print(QuickString &outBuf) const
{
outBuf.append(_chrName);
outBuf.append('\t');
outBuf.append(_startPos);
outBuf.append('\t');
outBuf.append(_endPos);
}
示例6: print
void BedPlusInterval::print(QuickString &outBuf, const QuickString & start, const QuickString & end) const
{
Bed6Interval::print(outBuf, start, end);
for (int i=0; i < (int)_otherIdxs.size(); i++) {
outBuf.append('\t');
outBuf.append(*(_otherIdxs[i]));
}
}
示例7: setErrorMsg
void ContextBase::setErrorMsg(QuickString &msg, bool onlyWarn, const Record * record, QuickString str1, const QuickString str2, const QuickString str3) {
if (onlyWarn) {
msg = "\n***** WARNING: ";
} else {
msg = "\n***** ERROR: ";
}
msg.append(str1);
msg.append(str2);
msg.append(str3);
msg.append(" Exiting...\n");
if (record != NULL) {
record->print(msg);
}
}
示例8: printOtherFields
void VcfRecord::printOtherFields(QuickString &outBuf) const {
outBuf.append('\t');
outBuf.append(_name);
outBuf.append('\t');
outBuf.append(_varAlt);
outBuf.append('\t');
outBuf.append(_varRef);
outBuf.append('\t');
outBuf.append(_score);
for (int i= 0; i < (int)_otherIdxs.size(); i++) {
outBuf.append('\t');
outBuf.append(*(_otherIdxs[i]));
}
}
示例9: print
void GffRecord::print(QuickString &outBuf, const QuickString & start, const QuickString & end) const
{
outBuf.append(_chrName);
outBuf.append('\t');
outBuf.append(_source);
outBuf.append('\t');
outBuf.append(_name);
outBuf.append('\t');
outBuf.append(start);
outBuf.append('\t');
outBuf.append(end);
outBuf.append('\t');
printRemainingFields(outBuf);
}
示例10: printOtherFields
void VcfRecord::printOtherFields(QuickString &outBuf) const {
outBuf.append('\t');
outBuf.append(_name);
outBuf.append('\t');
outBuf.append(_varRef);
outBuf.append('\t');
outBuf.append(_varAlt);
outBuf.append('\t');
outBuf.append(_score);
outBuf.append('\t');
_plusFields.printFields(outBuf);
}
示例11: print
void BedPlusInterval::print(QuickString &outBuf, const QuickString & start, const QuickString & end) const
{
Bed3Interval::print(outBuf, start, end);
outBuf.append('\t');
printBed6PlusFields(outBuf);
_plusFields.printFields(outBuf);
}
示例12: printRecord
void ComplementFile::printRecord(int endPos)
{
_outRecord.setStartPos(_currStartPos);
QuickString startStr;
startStr.append(_currStartPos);
_outRecord.setStartPosStr(startStr);
_outRecord.setEndPos(endPos);
QuickString endStr;
endStr.append(endPos);
_outRecord.setEndPosStr(endStr);
_outputMgr->printRecord(&_outRecord);
_outputMgr->newline();
}
示例13: getTypeData
bool BufferedStreamMgr::getTypeData()
{
QuickString currScanBuffer;
_inputStreamMgr->getSavedData(currScanBuffer);
do {
if (!_typeChecker.scanBuffer(currScanBuffer.c_str(), currScanBuffer.size()) && !_typeChecker.needsMoreData()) {
return false;
} else if (_typeChecker.needsMoreData()) {
_inputStreamMgr->populateScanBuffer();
currScanBuffer.clear();
_inputStreamMgr->getSavedData(currScanBuffer);
}
} while (_typeChecker.needsMoreData());
_inputStreamMgr->reset();
return true;
}
示例14: printNull
void BedPlusInterval::printNull(QuickString &outBuf) const
{
Bed6Interval::printNull(outBuf);
for (int i=startOtherIdx; i < _numPrintFields; i++) {
outBuf.append("\t.");
}
}
示例15: printNull
void GffPlusRecord::printNull(QuickString &outBuf) const
{
GffRecord::printNull(outBuf);
for (int i=_numFields; i < _numPrintFields; i++) {
outBuf.append("\t.");
}
}