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

VideoSet* Impala::Persistency::VideoSetRepositoryInFile::Get ( const Locator loc  )  [inline]

Definition at line 24 of file VideoSetRepositoryInFile.h.

References Impala::Core::Database::RawDataSet::AddFile(), Impala::Util::StringParser::At(), Impala::Util::IOBuffer::Available(), Impala::Util::StringParser::Eat(), Impala::Persistency::Locator::GetDataSet(), Impala::Persistency::RepositoryInFileSystem::GetFile(), Impala::Util::StringParser::GetInt(), Impala::Util::StringParser::GetString2(), Impala::Util::IOBuffer::ReadLine(), RepFS(), Impala::StringReplaceAll(), Impala::Util::StringParser::TheEnd(), and Impala::Util::IOBuffer::Valid().

00025     {
00026         VideoSet* res = new VideoSet(loc.GetDataSet());
00027         File f = RepFS().GetFile(loc, "VideoData", loc.GetDataSet(), false,
00028                                  false);
00029         Timer timer(1);
00030         Util::IOBuffer* buf = f.GetReadBuffer();
00031         if (buf->Valid())
00032         {
00033             while (buf->Available())
00034             {
00035                 String line = buf->ReadLine();
00036                 if (line[0] && (line[0] != '#'))
00037                 {
00038                     int id = -1;
00039                     String name("");
00040                     Util::StringParser p(line);
00041                     while (!p.TheEnd())
00042                     {
00043                         if (p.At("<id="))
00044                         {
00045                             p.Eat('=');
00046                             id = p.GetInt('>', true);
00047                             p.Eat('>');
00048                         }
00049                         else
00050                         {
00051                             String s = p.GetString2(false);
00052                             name = StringReplaceAll(s, "\\", "/");
00053                         }
00054                     }
00055                     res->AddFile(name, id);
00056                 }
00057             }
00058         }
00059         delete buf;
00060         return res;
00061     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:37:16 2010 for ImpalaSrc by  doxygen 1.5.1