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

template<class BackInsertIterator>
void Impala::Core::Geometry::DatabaseReadVxRectangle ( BackInsertIterator  bi,
const Persistency::FileLocator &  loc 
) [inline]

Definition at line 20 of file DatabaseReadVxRectangle.h.

References Impala::Util::IOBuffer::Available(), Impala::FileNameExt(), Impala::Persistency::File::GetReadBuffer(), Impala::Core::Geometry::VxRectangle::mAnno, Impala::Core::Geometry::VxRectangle::mDir, Impala::Core::Geometry::VxRectangle::mEndFrame, Impala::Core::Geometry::VxRectangle::mExtra, Impala::Core::Geometry::VxRectangle::mRect, Impala::Core::Geometry::VxRectangle::mSection, Impala::Core::Geometry::VxRectangle::mStartFrame, Impala::Core::Geometry::VxRectangle::mVideoName, and Impala::Util::IOBuffer::ReadLine().

Referenced by Impala::Core::VideoSet::Walker::LoadBookmarks().

00022 {
00023     typedef Persistency::RepositoryInFileSystem FS;
00024     Persistency::File file = FS::GetInstance().GetFile(loc, false, false);
00025     Util::IOBuffer* buf = file.GetReadBuffer(true, "");;
00026     if (! buf)
00027         return;
00028 
00029     bool hasSection = false;
00030     while (buf->Available())
00031     {
00032         String line = buf->ReadLine();
00033         if (! line[0])
00034             continue;
00035         Util::StringParser p(line);
00036         if (p.At("#@") && (p.Contains("section")))
00037             hasSection = true;
00038         if (p.At("#"))
00039             continue;
00040         VxRectangle vr;
00041         vr.mStartFrame = p.GetInt();
00042         vr.mEndFrame = p.GetInt();
00043         vr.mAnno = p.GetString();
00044         vr.mRect = p.GetRectangle();
00045         vr.mVideoName = p.GetString();
00046         if (hasSection)
00047         {
00048             vr.mSection = p.GetString();
00049             vr.mDir = p.GetString();
00050         }
00051         else
00052             if (FileNameExt(vr.mVideoName) == "")
00053                 vr.mVideoName = vr.mVideoName + ".mpg";
00054         if (! p.TheEnd())
00055             vr.mExtra = p.GetString();
00056         *bi++ = vr;
00057     }
00058     delete buf;
00059 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:19:36 2011 for ImpalaSrc by  doxygen 1.5.1