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

void Impala::Core::Database::RawDataSet::ExtractFileSectionDir ( CString  src,
String file,
String section,
String dir 
) [inline, protected]

Definition at line 976 of file RawDataSet.h.

00977     {
00978         StringList sl(src, '/', true);
00979 
00980         /* DK: can this be removed? Needs to be adjusted to use mContainer
00981         if (Link::DiskImage::DiskImageUsed())
00982         {
00983             const String::size_type firstTokenPos = src.find("//#");
00984             const bool parseDiskImageStyle = (firstTokenPos != String::npos);
00985             if (parseDiskImageStyle)
00986             {
00987                 StringList::iterator it = sl.begin();
00988                 section = "";
00989                 // define all until first token as 'section'
00990                 while (!it->empty())
00991                 {
00992                     if (it != sl.begin())
00993                         section += "/";
00994                     section += *it++;
00995                 }
00996                 it++; // skip slash that separates section and path
00997 
00998                 // 'dir' will now start with a token
00999                 dir = "";
01000                 while (it != sl.end())
01001                 {
01002                     String& next = *it;
01003                     it++;
01004                     if (it == sl.end())
01005                         file = next;
01006                     else
01007                         dir += "/" + next;
01008                 }
01009                 return;
01010             }
01011         }
01012         */
01013 
01014         StringList::reverse_iterator it = sl.rbegin();
01015         file = *it++;
01016         if (it != sl.rend())
01017             dir = *it++;
01018         if (it != sl.rend())
01019             section = *it++;
01020         while (it != sl.rend())
01021         {
01022             String subDir = *it++;
01023             if (subDir != ".")
01024                 section = subDir + "/" + section;
01025         }
01026     }


Generated on Thu Jan 13 09:18:59 2011 for ImpalaSrc by  doxygen 1.5.1