Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Core::Trec::SearchResult::Load ( std::string  fileName  )  [inline]

Definition at line 34 of file SearchResult.h.

References Impala::Util::StringParser::Advance(), Impala::File::Eof(), Impala::Util::StringParser::GetString(), mShot, mTopic, Impala::File::ReadLine(), and Impala::File::Valid().

Referenced by Impala::Visualization::SearchJudgeGui::DoJudgement(), SearchResult(), and Impala::Application::WindowTrecResult::WindowTrecResult().

00035     {
00036         File f(fileName, "r");
00037         if (! f.Valid())
00038             return;
00039         Util::StringParser first(f.ReadLine(true));
00040         first.Advance('"');
00041         mTopic = first.GetString();
00042         f.ReadLine(true); // skip second line
00043         while (! f.Eof())
00044         {
00045             std::string line = f.ReadLine(true);
00046             if (! line[0])
00047                 continue;
00048             Util::StringParser p(line);
00049             std::string str = p.GetString(' ', false);
00050             if (str != std::string("<item"))
00051                 continue;
00052             p.Advance('"', 3);
00053             str = p.GetString();
00054             mShot.push_back(str);
00055         }
00056     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:27 2011 for ImpalaSrc by  doxygen 1.5.1