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

TaskTable.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_VideoSet_TaskTable_h
00002 #define Impala_Core_VideoSet_TaskTable_h
00003 
00004 #include "Core/Table/TableTem.h"
00005 #include "Core/Table/Read.h"
00006 #include "Core/Table/Write.h"
00007 
00008 namespace Impala
00009 {
00010 namespace Core
00011 {
00012 namespace VideoSet
00013 {
00014 
00015 
00016 typedef Table::TableTem<Column::ColumnTem<Int32>,
00017                         Column::ColumnTem<Int32>,
00018                         Column::ColumnTem<Int32> > TaskTableBaseType;
00019 
00020 
00021 class TaskTable : public TaskTableBaseType
00022 {
00023 public:
00024 
00025     TaskTable() : TaskTableBaseType(0)
00026     {
00027         SetColName(1, "startFile");
00028         SetColName(2, "numberFiles");
00029         SetColName(3, "startFrame");
00030     }
00031 
00032 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00033     TaskTable(String fName, Util::Database* db) : TaskTableBaseType(0)
00034     {
00035         SetColName(1, "startFile");
00036         SetColName(2, "numberFiles");
00037         SetColName(3, "startFrame");
00038         if (!fName.empty())
00039             Load(fName, db);
00040     }
00041 #endif // REPOSITORY_USED
00042 
00043     // inquiry part
00044 
00045     int
00046     GetNrTasks()
00047     {
00048         return Size();
00049     }
00050 
00051     int
00052     GetStartFile(int idx)
00053     {
00054         return Get1(idx);
00055     }
00056 
00057     int
00058     GetNumberFiles(int idx)
00059     {
00060         return Get2(idx);
00061     }
00062 
00063     int
00064     GetStartFrame(int idx)
00065     {
00066         return Get3(idx);
00067     }
00068 
00069 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00070     // I/O part
00071 
00072     void
00073     Load(String fName, Util::Database* db)
00074     {
00075         Read(this, fName, db);
00076     }
00077 
00078     void
00079     Save(String fName, Util::Database* db, bool binary)
00080     {
00081         Write(this, fName, db, binary);
00082     }
00083 #endif // REPOSITORY_USED
00084 
00085 };
00086 
00087 } // namespace VideoSet
00088 } // namespace Core
00089 } // namespace Impala
00090 
00091 #endif

Generated on Fri Mar 19 09:31:32 2010 for ImpalaSrc by  doxygen 1.5.1