MCPcopy Create free account
hub / github.com/arq5x/bedtools2 / GetNextTabLine

Method GetNextTabLine

src/utils/tabFile/tabFile.cpp:59–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58
59TabLineStatus TabFile::GetNextTabLine(TAB_FIELDS &tabFields, int &lineNum) {
60
61 // make sure there are still lines to process.
62 // if so, tokenize, return the TAB_FIELDS.
63 if (_tabStream->good() == true) {
64 string tabLine;
65 tabFields.reserve(20);
66
67 // parse the tabStream pointer
68 getline(*_tabStream, tabLine);
69
70 if (tabLine[tabLine.size()-1] == '\r') {
71 tabLine.resize(tabLine.size()-1);
72 }
73
74 lineNum++;
75
76 // split into a string vector.
77 Tokenize(tabLine, tabFields);
78
79 // parse the line and validate it
80 return parseTabLine(tabFields, lineNum);
81 }
82
83 // default if file is closed or EOF
84 return TAB_INVALID;
85}

Callers 1

ExpandFunction · 0.80

Calls 4

TokenizeFunction · 0.85
reserveMethod · 0.80
resizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected