Programma per testare la lettura sequenziale dei file. git-svn-id: svn://10.65.10.50/trunk@21 c028cbd2-c16b-5b4b-a496-9718f37d4682
53 lines
1.1 KiB
C++
Executable File
53 lines
1.1 KiB
C++
Executable File
#include <applicat.h>
|
|
#include <isam.h>
|
|
#include <progind.h>
|
|
#include <urldefid.h>
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// Testfil
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TTest_application : public TApplication
|
|
{
|
|
|
|
protected:
|
|
bool create() { dispatch_e_menu(BAR_ITEM(1)); return TRUE; }
|
|
bool destroy() { return TRUE; }
|
|
bool menu(MENU_TAG);
|
|
|
|
public:
|
|
TTest_application() {}
|
|
};
|
|
|
|
bool TTest_application::menu(MENU_TAG)
|
|
{
|
|
TLocalisamfile tab(LF_TABCOM);
|
|
const TRecnotype n = tab.items();
|
|
TProgind p(n, "Lettura file tabelle comuni", TRUE, TRUE, 32);
|
|
|
|
const time_t start = time(NULL);
|
|
TRecnotype r = 1;
|
|
|
|
TString80 msg;
|
|
for (tab.first(); tab.good(); tab.next(), r++)
|
|
{
|
|
msg.format("%ld rec : %ld sec", r, time(NULL) - start);
|
|
p.addstatus(1);
|
|
p.set_text(msg);
|
|
if (p.iscancelled()) break;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
int ba1200(int argc, char** argv)
|
|
{
|
|
TTest_application a;
|
|
a.run(argc, argv, "Test File");
|
|
return 0;
|
|
}
|
|
|