template<class BackInsertIterator>
Definition at line 22 of file DatabaseReadVxRectangle.h. References Impala::Util::IOBuffer::Available(), Impala::FileNameExt(), Impala::Util::Database::GetIOBuffer(), 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(). 00024 { 00025 Util::IOBuffer* buf = db->GetIOBuffer(fileName, true, 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 }
Here is the call graph for this function:
|