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

FeatureTableSet* Impala::Persistency::FeatureTableSetRepository::Get ( const FeatureLocator loc  )  [inline]

Definition at line 31 of file FeatureTableSetRepository.h.

References Impala::Core::Feature::FeatureTableSet::Add(), Impala::Util::Append(), Impala::Core::Feature::FeatureTableSet::Delete(), Impala::FileNameExt(), Impala::Persistency::FeatureLocator::GetFeatureString(), Impala::Persistency::FeatureLocator::GetIsPartial(), Impala::Persistency::FeatureLocator::GetNumberFrames(), Impala::Persistency::FeatureLocator::GetStartFrame(), ILOG_ERROR, Impala::Persistency::FeatureLocator::SetFeatureDef(), Impala::Persistency::FeatureLocator::SetStartFrame(), and Impala::Core::Feature::FeatureTableSet::Size().

00032     {
00033         String featureString = loc.GetFeatureString();
00034         FeatureList featList;
00035         if (FileNameExt(featureString) == "txt")
00036         {
00037             featList = *(FeatureListRepository().Get(loc));
00038         }
00039         else
00040         {
00041             StringList defList(featureString, ';');
00042             for (StringListCI i=defList.begin() ; i!=defList.end() ; i++)
00043                 featList.push_back(*i);
00044         }
00045         if (featList.size() == 0)
00046         {
00047             ILOG_ERROR("Get: feature list is empty");
00048             return 0;
00049         }
00050 
00051         FeatureTableSet* res = new FeatureTableSet();
00052         FeatureLocator tLoc = loc;
00053         for (int i=0 ; i<featList.size() ; i++)
00054         {
00055             tLoc.SetFeatureDef(featList[i]);
00056             FeatureTable* table = 0;
00057             tLoc.SetStartFrame(0);
00058             bool done = false;
00059             while (!done)
00060             {
00061                 if (tLoc.GetIsPartial() && (tLoc.GetStartFrame() != 0) &&
00062                     !FeatureTableRepository().Exists(tLoc))
00063                 {
00064                     done = true;
00065                 }
00066                 else
00067                 {
00068                     if (table == 0)
00069                     {
00070                         table = FeatureTableRepository().Get(tLoc);
00071                     }
00072                     else
00073                     {
00074                         FeatureTable* t = FeatureTableRepository().Get(tLoc);
00075                         Core::Table::Append(table, t);
00076                         delete t;
00077                     }
00078                 }
00079                 if (!tLoc.GetIsPartial())
00080                     done = true;
00081                 tLoc.SetStartFrame(tLoc.GetStartFrame()+tLoc.GetNumberFrames());
00082             }
00083             if (table != 0)
00084                 res->Add(table);
00085         }
00086         if (res->Size() == 0)
00087         {
00088             ILOG_ERROR("Get: no feature tables found");
00089             res->Delete();
00090             delete res;
00091             return 0;
00092         }
00093         return res;
00094     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:22:49 2011 for ImpalaSrc by  doxygen 1.5.1