MCPcopy Create free account
hub / github.com/devosoft/avida / GetLineAsDict

Method GetLineAsDict

avida-core/source/tools/cInitFile.cc:305–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305Apto::SmartPtr<Apto::Map<Apto::String, Apto::String> > cInitFile::GetLineAsDict(int line_num)
306{
307 Apto::SmartPtr<Apto::Map<Apto::String, Apto::String> > dict(new Apto::Map<Apto::String, Apto::String>);
308
309 cStringList fmt = m_format;
310 cStringList line;
311 if (line_num >= 0 && line_num < m_lines.GetSize()) line.Load(m_lines[line_num]->line);
312
313 while (fmt.GetSize() && line.GetSize()) dict->Set((const char*)fmt.Pop(), (const char*)line.Pop());
314
315 return dict;
316}
317
318
319bool cInitFile::Find(cString& in_string, const cString& keyword, int col) const

Callers 3

LoadMiniTraceQMethod · 0.80
LoadPopulationMethod · 0.80

Calls 4

GetSizeMethod · 0.45
LoadMethod · 0.45
SetMethod · 0.45
PopMethod · 0.45

Tested by

no test coverage detected