mLastTypeSeen(eLineTypeNone),
64 "Data line out of order");
71 stringnextLine =
"";
72 while(!lineReader.
AtEOF()) {
73nextLine = *(++lineReader);
123 throwerrorDataLineOutOfOrder;
140 throwerrorDataLineOutOfOrder;
150 throwerrorDataLineOutOfOrder;
163 const string& line_,
175 throwerrorBadDataLine;
183 if(
columns[0] ==
">Feature") {
194 constvector<string>&
columns)
202 throwerrorBadDataLine;
209 if(
columns[0] ==
">Feature") {
221 throwerrorBadDataLine;
228 constvector<string>& lines,
234 "Invalid interval boundaries",
243vector<pair<int, int>> vecIntervals;
244vector<pair<bool, bool>> vecPartials;
245vector<pair<string, string>> vecAttributes;
256 intintervalFrom(0), intervalTo(0);
257 boolpartialFrom(
false), partialTo(
false);
260 if(fromStr[0] ==
'<'|| fromStr[0] ==
'>') {
261fromStr = fromStr.substr(1, string::npos);
265 if(toStr[0] ==
'<'|| toStr[0] ==
'>') {
266toStr = toStr.substr(1, string::npos);
274 throwerrorBadIntervalBoundaries;
276vecIntervals.push_back(pair<int, int>(intervalFrom, intervalTo));
277vecPartials.push_back(pair<bool, bool>(partialFrom, partialTo));
279 for(
;
i< lines.size(); ++
i) {
282vecAttributes.push_back(pair<string, string>(
columns[3],
columns[4]));
286 for(
autointerval: vecIntervals) {
291record.
Initialize(seqId, featType, vecIntervals, vecPartials, vecAttributes);
void Initialize(const std::string &, const std::string &, const std::vector< std::pair< int, int >> &, const std::vector< std::pair< bool, bool >> &, const std::vector< std::pair< std::string, std::string >> &)
@ eLineTypeIntervalAndType
C5ColLineReader(CImportMessageHandler &)
std::string mCurrentSeqId
virtual bool GetNextRecord(CStreamLineReader &, CFeatImportData &) override
ELineType xLineTypeOf(const std::vector< std::string > &)
std::vector< std::string > mCollectedLines
void xSplitLine(const std::string &, std::vector< std::string > &)
void xInitializeRecord(const std::vector< std::string > &, CFeatImportData &) override
virtual void xReportProgress()
virtual bool xIgnoreLine(const string &) const
CImportMessageHandler & mErrorReporter
unsigned int LineCount() const
unsigned int mRecordCount
void SetLineNumber(unsigned int lineNumber)
virtual void ReportError(const CImportError &)
Simple implementation of ILineReader for i(o)streams.
static const column_t columns[]
bool AtEOF(void) const
Indicates (negatively) whether there is any more input.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
@ fAllowTrailingSymbols
Ignore trailing non-numerics characters.
@ fAllowLeadingSpaces
Ignore leading whitespace characters in converted string.
@ eTrunc_End
Truncate trailing whitespace only.
constexpr bool empty(list< Ts... >) noexcept
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4