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

Core::Geometry::Rectangle Impala::Util::StringParser::GetRectangle ( char  delim = '"',
bool  delimRequired = true 
) [inline]

Definition at line 91 of file StringParser.h.

References Impala::atoi(), mP, mText, and SkipWhitespace().

Referenced by Impala::Core::Geometry::DatabaseReadVxRectangle().

00092     {
00093         SkipWhitespace(delim);
00094         int coord[4];
00095         char delims[4] = {' ', ' ', ' ', delim};
00096         for (int i=0 ; i<4 ; i++)
00097         {
00098             String::size_type end = mText.find(delims[i], mP);
00099             if ((end == String::npos) && delimRequired)
00100                 std::cout << "StringParser::getRectangle: delim not found"
00101                           << std::endl;
00102             String str = mText.substr(mP, end - mP);
00103             //std::cout << "str = " << str << std::endl;
00104             coord[i] = atoi(str);
00105             mP = (end == String::npos) ? end : end+1;
00106         }
00107         return Core::Geometry::Rectangle(coord[0],coord[1],coord[2],coord[3]);
00108     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:41:20 2010 for ImpalaSrc by  doxygen 1.5.1