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

void Impala::Application::Table::DoDumpQuidTable (  ) 

Definition at line 300 of file mainTable.cpp.

References Impala::atoull(), Impala::Util::DatabaseReadString(), Impala::FileNameExt(), Impala::CmdOptions::GetArg(), Impala::Core::Database::RawDataSet::GetDatabase(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::CmdOptions::GetNrArg(), Impala::CmdOptions::GetString(), Impala::Core::ImageSet::MakeImageSet(), Impala::Core::VideoSet::MakeVideoSet(), and Impala::Core::Table::Read().

Referenced by mainTable().

00301 {
00302     typedef Core::Table::QuidTable QuidTable;
00303 
00304     CmdOptions& options = CmdOptions::GetInstance();
00305     String fName = options.GetArg(1);
00306     bool doGroup = (options.GetNrArg() > 2);
00307 
00308     Core::Database::RawDataSet* dataSet = 0;
00309     String setName = options.GetString("videoSet");
00310     if (! setName.empty())
00311         dataSet = Core::VideoSet::MakeVideoSet(setName);
00312     setName = options.GetString("imageSet");
00313     if (! setName.empty())
00314         dataSet = Core::ImageSet::MakeImageSet(setName);
00315     Util::Database* db = &Util::Database::GetInstance();
00316     if (dataSet)
00317         db = dataSet->GetDatabase();
00318     QuidTable table;
00319     if (FileNameExt(fName) == "tab")
00320     {
00321         Core::Table::Read(&table, fName, db);
00322     }
00323     else
00324     {
00325         std::vector<String> quids;
00326         Util::DatabaseReadString(std::back_inserter(quids), fName, db, true);
00327         for (int i=0 ; i<quids.size() ; i++)
00328         {
00329             Quid q = atoull(quids[i]);
00330             table.Add(q);
00331         }
00332     }
00333     table.Dump(dataSet, options.GetInt("start"), options.GetInt("end"));
00334     //Core::Table::Write(&table, fName, false);
00335     if (doGroup)
00336     {
00337         table.UpdateGroups();
00338         table.DumpGroup();
00339     }
00340 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:50:50 2010 for ImpalaSrc by  doxygen 1.5.1