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

ImageSet* Impala::Persistency::ImageSetRepositoryInFile::Get ( const ImageSetLocator loc  )  [inline]

Definition at line 33 of file ImageSetRepositoryInFile.h.

References Impala::Core::Database::RawDataSet::AddFile(), Impala::Util::StringParser::At(), Impala::Util::IOBuffer::Available(), Impala::Util::StringParser::Eat(), Impala::Persistency::RepositoryInFileSystem::GetFile(), Impala::Util::StringParser::GetInt(), Impala::Persistency::ImageSetLocator::GetName(), Impala::Persistency::Locator::GetProtocolAndHost(), Impala::Persistency::File::GetReadBuffer(), Impala::Util::StringParser::GetString2(), ILOG_DEBUG, Impala::Util::IOBuffer::ReadLine(), RepFS(), Impala::Core::ImageSet::ImageSet::SetImageSetLocator(), Impala::Core::Database::RawDataSet::SetProtocolAndHost(), Impala::Timer::SplitTime(), Impala::StringReplaceAll(), Impala::Util::StringParser::TheEnd(), and Impala::Util::IOBuffer::Valid().

00034     {
00035         ImageSet* res = new ImageSet(loc.GetName());
00036         res->SetProtocolAndHost(loc.GetProtocolAndHost());
00037         res->SetImageSetLocator(loc);
00038         File f = RepFS().GetFile(loc, "ImageData", loc.GetName(), false, false);
00039         Timer timer(1);
00040         //Util::IOBuffer* buf = f.GetReadBuffer();
00041         Util::IOBuffer* buf = f.GetReadBuffer(true, "", 0, false);
00042         if (buf->Valid())
00043         {
00044             while (buf->Available())
00045             {
00046                 String line = buf->ReadLine();
00047                 if (line[0] && (line[0] != '#'))
00048                 {
00049                     int id = -1;
00050                     String name("");
00051                     Util::StringParser p(line);
00052                     while (!p.TheEnd())
00053                     {
00054                         if (p.At("<id="))
00055                         {
00056                             p.Eat('=');
00057                             id = p.GetInt('>', true);
00058                             p.Eat('>');
00059                         }
00060                         else
00061                         {
00062                             String s = p.GetString2(false);
00063                             name = StringReplaceAll(s, "\\", "/");
00064                         }
00065                     }
00066                     res->AddFile(name, id);
00067                 }
00068             }
00069         }
00070         delete buf;
00071         ILOG_DEBUG("Done read file in " << timer.SplitTime());
00072         return res;
00073     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:23:05 2011 for ImpalaSrc by  doxygen 1.5.1