Corretti alcune minchiatine di coversione long->int
git-svn-id: svn://10.65.10.50/trunk@304 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
fb0ebca1cc
commit
832f08d056
422
ba/ba1300.cpp
422
ba/ba1300.cpp
@ -1,210 +1,212 @@
|
||||
#include <stdlib.h>
|
||||
#include <applicat.h>
|
||||
#include <xvtility.h>
|
||||
#include <utility.h>
|
||||
#include <prefix.h>
|
||||
#include <mask.h>
|
||||
#include <isam.h>
|
||||
#include <string.h>
|
||||
#include <sheet.h>
|
||||
#include <msksheet.h>
|
||||
#include <progind.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include "ba1.h"
|
||||
#include "ba1300.h"
|
||||
#include "ba1300a.h"
|
||||
|
||||
|
||||
class BA1300_application:public TApplication
|
||||
{
|
||||
TTestSheet * _testsheet;
|
||||
TTestProc * _test,
|
||||
* _debug;
|
||||
TMask * _mask;
|
||||
long _firm;
|
||||
|
||||
protected:
|
||||
virtual bool menu(MENU_TAG);
|
||||
virtual bool create () ;
|
||||
virtual bool destroy();
|
||||
virtual bool extended_firm() const { return TRUE; }
|
||||
|
||||
public:
|
||||
BA1300_application() : _testsheet(NULL), _mask(NULL) {}
|
||||
TTestSheet * get_sheet() {return _testsheet;}
|
||||
TTestProc * get_test() {return _test;}
|
||||
TMask * get_mask() {return _mask;}
|
||||
TArray_sheet * field_sheet(TMask *);
|
||||
|
||||
};
|
||||
|
||||
HIDDEN bool seq_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key==K_ENTER)
|
||||
if (!fexist((const char*)f.get()))
|
||||
{
|
||||
warning_box("File inesistente");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool BA1300_application::create() // initvar e arrmask
|
||||
|
||||
{
|
||||
_firm = get_firm();
|
||||
|
||||
if (argc() > 2)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_mask = new TMask ("ba1300a"); // Maschera principale
|
||||
set_firm();
|
||||
_testsheet = new TTestSheet("Selezione Files") ;
|
||||
get_sheet()->add_button(DLG_RESET,"~Reset",K_F6);
|
||||
}
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
bool BA1300_application::destroy() // releasev e arrmask
|
||||
|
||||
{
|
||||
if (_firm) set_firm(_firm);
|
||||
if (_testsheet != NULL) delete _testsheet;
|
||||
if (_mask != NULL) delete _mask;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
TArray_sheet * BA1300_application::field_sheet(TMask * m)
|
||||
{
|
||||
TEdit_field& f=(TEdit_field&) m->field(F_FILE);
|
||||
TArray_sheet * s=(TArray_sheet*) f.sheet()->sheet();
|
||||
return s;
|
||||
}
|
||||
|
||||
bool BA1300_application::menu(MENU_TAG m)
|
||||
{
|
||||
KEY tasto,tastoS;
|
||||
long numtest;
|
||||
TMask *msk;
|
||||
TDir *cdir;
|
||||
|
||||
disable_menu_item(M_FILE_NEW);
|
||||
switch (m)
|
||||
{
|
||||
case BAR_ITEM(2):
|
||||
msk = new TMask("ba1300b");
|
||||
cdir = new TDir;
|
||||
cdir->get(LF_DIR,_nolock,_nordir,_sysdirop);
|
||||
const int nitems=cdir->eod();
|
||||
for (int i=0; i<nitems;i++) // fill sheet
|
||||
{
|
||||
TToken_string riga(128);
|
||||
riga.cut(0);
|
||||
cdir->get(i+1,_nolock,_nordir,_sysdirop);
|
||||
riga=format("%3d",i+1);
|
||||
riga.add(cdir->name());
|
||||
riga.add(format("%ld",cdir->eod()));
|
||||
riga.add(format("%ld",cdir->eox()));
|
||||
riga.add(format("%u",cdir->len()));
|
||||
riga.add(cdir->des());
|
||||
field_sheet(msk)->add(riga);
|
||||
}
|
||||
msk->set_handler(F_SEQUENZA,seq_handler);
|
||||
if (msk->run()==K_ENTER)
|
||||
{
|
||||
_debug = new TTestProc;
|
||||
_debug->set_file(msk->get_long(F_FILE));
|
||||
_debug->load_random(msk->get(F_SEQUENZA));
|
||||
if (!_debug->stopped())
|
||||
_debug->do_debug();
|
||||
else
|
||||
warning_box("File di sequenza non valido");
|
||||
delete _debug;
|
||||
}
|
||||
delete msk;
|
||||
delete cdir;
|
||||
break;
|
||||
case BAR_ITEM(1):
|
||||
do {
|
||||
switch(tasto=get_mask()->run())
|
||||
{
|
||||
case K_ENTER:
|
||||
if (get_sheet()->checked()>0 && (get_mask()->get_long(F_ITERAZIONI)>0 || get_mask()->get_bool(F_CONTINUO)))
|
||||
{
|
||||
_test = new TTestProc;
|
||||
get_test()->set_sheet(get_sheet());
|
||||
get_test()->set_rmc();
|
||||
get_test()->get_win()->set_color(COLOR_BLACK,COLOR_WHITE);
|
||||
get_test()->get_win()->clear(COLOR_WHITE);
|
||||
get_test()->get_win()->set_caption("Verifica di stabilita'");
|
||||
get_test()->get_win()->WriteW(10,5,"Test N. :");
|
||||
get_test()->get_win()->WriteW(10,7,"Nome File :");
|
||||
get_test()->get_win()->WriteW(10,9,"Record cancellati :");
|
||||
get_test()->get_win()->WriteW(10,10,"Operazione in corso :");
|
||||
get_test()->get_win()->WriteW(10,12,"Tempo trascorso :");
|
||||
get_test()->get_win()->WriteW(10,13,"Tempo stimato :");
|
||||
get_test()->get_win()->WriteW(10,15,"Ultimo Errore :");
|
||||
numtest=0;
|
||||
while (((++numtest)<=get_mask()->get_long(F_ITERAZIONI) || get_mask()->get_bool(F_CONTINUO)) && (!get_test()->stopped()))
|
||||
{
|
||||
if (get_mask()->get_bool(F_CONTINUO))
|
||||
get_test()->get_win()->WriteW(33,5,(const char*)TString(20).format("%4ld (CONTINUO)",numtest));
|
||||
else
|
||||
get_test()->get_win()->WriteW(33,5,(const char*)TString(20).format("%4ld/%-4ld",numtest,_mask->get_long(F_ITERAZIONI)));
|
||||
get_test()->set_numt(numtest);
|
||||
get_test()->do_test_1();
|
||||
}
|
||||
if (get_test()->rm_copy())
|
||||
{
|
||||
get_test()->get_win()->WriteW(33,10,"CANCELLAZIONE COPIE ");
|
||||
for (long i=0;i<get_sheet()->items();i++)
|
||||
if (get_sheet()->checked(i))
|
||||
get_test()->remove_copy(i+1);
|
||||
}
|
||||
delete _test;
|
||||
}
|
||||
else
|
||||
warning_box("Nessun file selezionato");
|
||||
break;
|
||||
case K_F4:
|
||||
get_sheet()->sr_status();
|
||||
while ((tastoS=get_sheet()->run()) == K_F6)
|
||||
for (int i=0; i<get_sheet()->items();i++)
|
||||
get_sheet()->uncheck(i);
|
||||
if (tastoS == K_ESC)
|
||||
get_sheet()->sr_status(FALSE);
|
||||
else
|
||||
{ // Cannot select first two files.
|
||||
get_sheet()->uncheck(0);
|
||||
get_sheet()->uncheck(1);
|
||||
}
|
||||
break;
|
||||
case K_F5:
|
||||
if (fexist((const char*)TString(20).format("test%creport.txt",Separator)))
|
||||
{
|
||||
TTestReport rep_win("Report");
|
||||
rep_win.load_report();
|
||||
rep_win.run();
|
||||
} else
|
||||
warning_box("Report non disponibile");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} while (tasto != K_ESC);
|
||||
break;
|
||||
}
|
||||
enable_menu_item(M_FILE_NEW);
|
||||
return xvt_test_menu_tag(BAR_ITEM(2));
|
||||
}
|
||||
|
||||
int ba1300(int argc, char** argv)
|
||||
{
|
||||
BA1300_application a;
|
||||
a.run(argc,argv,"Test dell'ISAM");
|
||||
return 0;
|
||||
}
|
||||
#include <stdlib.h>
|
||||
#include <applicat.h>
|
||||
#include <xvtility.h>
|
||||
#include <utility.h>
|
||||
#include <prefix.h>
|
||||
#include <mask.h>
|
||||
#include <isam.h>
|
||||
#include <string.h>
|
||||
#include <sheet.h>
|
||||
#include <msksheet.h>
|
||||
#include <progind.h>
|
||||
#include <urldefid.h>
|
||||
#include <validate.h>
|
||||
#include "ba1.h"
|
||||
#include "ba1300.h"
|
||||
#include "ba1300a.h"
|
||||
|
||||
|
||||
class BA1300_application:public TApplication
|
||||
{
|
||||
TTestSheet * _testsheet;
|
||||
TTestProc * _test,
|
||||
* _debug;
|
||||
TMask * _mask;
|
||||
long _firm;
|
||||
|
||||
protected:
|
||||
virtual bool menu(MENU_TAG);
|
||||
virtual bool create () ;
|
||||
virtual bool destroy();
|
||||
virtual bool extended_firm() const { return TRUE; }
|
||||
|
||||
public:
|
||||
BA1300_application() : _testsheet(NULL), _mask(NULL) {}
|
||||
TTestSheet * get_sheet() {return _testsheet;}
|
||||
TTestProc * get_test() {return _test;}
|
||||
TMask * get_mask() {return _mask;}
|
||||
TArray_sheet * field_sheet(TMask *);
|
||||
|
||||
};
|
||||
|
||||
HIDDEN bool seq_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key==K_ENTER)
|
||||
if (!fexist((const char*)f.get()))
|
||||
{
|
||||
warning_box("File inesistente");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool BA1300_application::create() // initvar e arrmask
|
||||
|
||||
{
|
||||
_firm = get_firm();
|
||||
|
||||
if (argc() > 2)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_mask = new TMask ("ba1300a"); // Maschera principale
|
||||
set_firm();
|
||||
_testsheet = new TTestSheet("Selezione Files") ;
|
||||
get_sheet()->add_button(DLG_RESET,"~Reset",K_F6);
|
||||
}
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
bool BA1300_application::destroy() // releasev e arrmask
|
||||
|
||||
{
|
||||
if (_firm) set_firm(_firm);
|
||||
if (_testsheet != NULL) delete _testsheet;
|
||||
if (_mask != NULL) delete _mask;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
TArray_sheet * BA1300_application::field_sheet(TMask * m)
|
||||
{
|
||||
TEdit_field& f=(TEdit_field&) m->field(F_FILE);
|
||||
TArray_sheet * s=(TArray_sheet*) f.sheet()->sheet();
|
||||
return s;
|
||||
}
|
||||
|
||||
bool BA1300_application::menu(MENU_TAG m)
|
||||
{
|
||||
KEY tasto,tastoS;
|
||||
long numtest;
|
||||
TMask *msk;
|
||||
TDir *cdir;
|
||||
|
||||
disable_menu_item(M_FILE_NEW);
|
||||
switch (m)
|
||||
{
|
||||
case BAR_ITEM(2):
|
||||
{
|
||||
msk = new TMask("ba1300b");
|
||||
cdir = new TDir;
|
||||
cdir->get(LF_DIR,_nolock,_nordir,_sysdirop);
|
||||
const int nitems=(int)cdir->eod();
|
||||
for (int i=0; i<nitems;i++) // fill sheet
|
||||
{
|
||||
TToken_string riga(128);
|
||||
riga.cut(0);
|
||||
cdir->get(i+1,_nolock,_nordir,_sysdirop);
|
||||
riga=format("%3d",i+1);
|
||||
riga.add(cdir->name());
|
||||
riga.add(format("%ld",cdir->eod()));
|
||||
riga.add(format("%ld",cdir->eox()));
|
||||
riga.add(format("%u",cdir->len()));
|
||||
riga.add(cdir->des());
|
||||
field_sheet(msk)->add(riga);
|
||||
}
|
||||
msk->set_handler(F_SEQUENZA,seq_handler);
|
||||
if (msk->run()==K_ENTER)
|
||||
{
|
||||
_debug = new TTestProc;
|
||||
_debug->set_file(msk->get_int(F_FILE));
|
||||
_debug->load_random(msk->get(F_SEQUENZA));
|
||||
if (!_debug->stopped())
|
||||
_debug->do_debug();
|
||||
else
|
||||
warning_box("File di sequenza non valido");
|
||||
delete _debug;
|
||||
}
|
||||
delete msk;
|
||||
delete cdir;
|
||||
}
|
||||
break;
|
||||
case BAR_ITEM(1):
|
||||
do {
|
||||
switch(tasto=get_mask()->run())
|
||||
{
|
||||
case K_ENTER:
|
||||
if (get_sheet()->checked()>0 && (get_mask()->get_long(F_ITERAZIONI)>0 || get_mask()->get_bool(F_CONTINUO)))
|
||||
{
|
||||
_test = new TTestProc;
|
||||
get_test()->set_sheet(get_sheet());
|
||||
get_test()->set_rmc();
|
||||
get_test()->get_win()->set_color(COLOR_BLACK,COLOR_WHITE);
|
||||
get_test()->get_win()->clear(COLOR_WHITE);
|
||||
get_test()->get_win()->set_caption("Verifica di stabilita'");
|
||||
get_test()->get_win()->WriteW(10,5,"Test N. :");
|
||||
get_test()->get_win()->WriteW(10,7,"Nome File :");
|
||||
get_test()->get_win()->WriteW(10,9,"Record cancellati :");
|
||||
get_test()->get_win()->WriteW(10,10,"Operazione in corso :");
|
||||
get_test()->get_win()->WriteW(10,12,"Tempo trascorso :");
|
||||
get_test()->get_win()->WriteW(10,13,"Tempo stimato :");
|
||||
get_test()->get_win()->WriteW(10,15,"Ultimo Errore :");
|
||||
numtest=0;
|
||||
while (((++numtest)<=get_mask()->get_long(F_ITERAZIONI) || get_mask()->get_bool(F_CONTINUO)) && (!get_test()->stopped()))
|
||||
{
|
||||
if (get_mask()->get_bool(F_CONTINUO))
|
||||
get_test()->get_win()->WriteW(33,5,format("%4ld (CONTINUO)",numtest));
|
||||
else
|
||||
get_test()->get_win()->WriteW(33,5,format("%4ld/%-4ld",numtest,_mask->get_long(F_ITERAZIONI)));
|
||||
get_test()->set_numt(numtest);
|
||||
get_test()->do_test_1();
|
||||
}
|
||||
if (get_test()->rm_copy())
|
||||
{
|
||||
get_test()->get_win()->WriteW(33,10,"CANCELLAZIONE COPIE ");
|
||||
for (int i=0;i<get_sheet()->items();i++)
|
||||
if (get_sheet()->checked(i))
|
||||
get_test()->remove_copy(i+1);
|
||||
}
|
||||
delete _test;
|
||||
}
|
||||
else
|
||||
warning_box("Nessun file selezionato");
|
||||
break;
|
||||
case K_F4:
|
||||
get_sheet()->sr_status();
|
||||
while ((tastoS=get_sheet()->run()) == K_F6)
|
||||
for (int i=0; i<get_sheet()->items();i++)
|
||||
get_sheet()->uncheck(i);
|
||||
if (tastoS == K_ESC)
|
||||
get_sheet()->sr_status(FALSE);
|
||||
else
|
||||
{ // Cannot select first two files.
|
||||
get_sheet()->uncheck(0);
|
||||
get_sheet()->uncheck(1);
|
||||
}
|
||||
break;
|
||||
case K_F5:
|
||||
if (fexist((const char*)TString(20).format("test%creport.txt",Separator)))
|
||||
{
|
||||
TTestReport rep_win("Report");
|
||||
rep_win.load_report();
|
||||
rep_win.run();
|
||||
} else
|
||||
warning_box("Report non disponibile");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} while (tasto != K_ESC);
|
||||
break;
|
||||
}
|
||||
enable_menu_item(M_FILE_NEW);
|
||||
return xvt_test_menu_tag(BAR_ITEM(2));
|
||||
}
|
||||
|
||||
int ba1300(int argc, char** argv)
|
||||
{
|
||||
BA1300_application a;
|
||||
a.run(argc,argv,"Test dell'ISAM");
|
||||
return 0;
|
||||
}
|
||||
|
206
ba/ba1300.h
206
ba/ba1300.h
@ -1,103 +1,103 @@
|
||||
#ifndef __BA1300_H
|
||||
#define __BA1300_H
|
||||
|
||||
#include "ba1100.h"
|
||||
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#define Separator '\\'
|
||||
#else
|
||||
#define Separator '/'
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////
|
||||
// Here defining classes //
|
||||
////////////////////////////////////////
|
||||
|
||||
class TTestSheet : public TDir_sheet
|
||||
{
|
||||
TBit_array _oldstatus; // Previous status of selected files
|
||||
protected:
|
||||
void page_build(long first, byte rows);
|
||||
public:
|
||||
TTestSheet(const char* titolo, const char* colonne="@1|N.@5|Nome@20|EOD@7|EOX@7|Lung. |Descrizione@43|Flags@7", byte bottoni=0x0);
|
||||
~TTestSheet() ;
|
||||
void sr_status(bool save=TRUE);
|
||||
};
|
||||
|
||||
class TTestFile : public TBaseisamfile
|
||||
{
|
||||
public:
|
||||
TTestFile(int ln,bool lt=TRUE) : TBaseisamfile(ln,lt) {}
|
||||
virtual ~TTestFile() {}
|
||||
int close() {return _close();}
|
||||
int open(unsigned int mode = _manulock) {return _open(mode);}
|
||||
const char * file_name() const {return filename();}
|
||||
};
|
||||
|
||||
class TTestWin : public TIndwin
|
||||
{
|
||||
protected:
|
||||
virtual void update() {update_text();}
|
||||
virtual void handler(WINDOW w, EVENT *e);
|
||||
void update_text() {set_mode(M_COPY); check_stop();}
|
||||
public:
|
||||
void WriteW(short x, short y, const char* line) {stringat(x,y,line);update_text();do_events();}
|
||||
TTestWin();
|
||||
~TTestWin() {};
|
||||
};
|
||||
|
||||
class TTestProc
|
||||
{
|
||||
TTestSheet * _sheet; // Sheet with files selected
|
||||
TTestFile * _workf; // working file
|
||||
TTestWin * _win; // Output window
|
||||
long * _randseq; // Random sequence
|
||||
long _ntest; // number of test in progress
|
||||
int _nfile; // number of file being tested
|
||||
long _kriminal; // number of record incriminated (Debug)
|
||||
int _nkeys; // # of keys defined for current file
|
||||
bool _block; // is test blocked ?
|
||||
bool _rmc; // Remove copies at the end of test ?
|
||||
protected:
|
||||
void do_random(long eod);
|
||||
void filecopy(bool save=TRUE);
|
||||
void DumpReport(int err, long i, long x, int key);
|
||||
long sumop(const long n) {return ((n+1)*(n/2)+(n%2)*((n+1)/2));}
|
||||
int ctrl_keys();
|
||||
bool show_mess(int, int, long, long, int);
|
||||
const char * fmttime(const long);
|
||||
public:
|
||||
TTestProc();
|
||||
~TTestProc();
|
||||
const char* get_base();
|
||||
void do_test_1();
|
||||
void do_test_2();
|
||||
void do_debug();
|
||||
void remove_copy(long n);
|
||||
void load_random(const TString& st);
|
||||
bool stopped() {return _block;}
|
||||
bool rm_copy() {return _rmc;}
|
||||
void set_rmc(bool a=FALSE) {_rmc = a;}
|
||||
long num_test() {return _ntest;}
|
||||
void set_numt(const long num) { _ntest = num;}
|
||||
long num_file() {return _nfile;}
|
||||
void set_file(long n) {_nfile=n;}
|
||||
long number(const long n) {return _randseq[n];}
|
||||
void set_sheet (TTestSheet * sh) {_sheet=sh;}
|
||||
TTestSheet * get_isheet() {return _sheet;}
|
||||
TTestWin * get_win() {return _win;}
|
||||
};
|
||||
|
||||
class TTestReport : public TScroll_window
|
||||
{
|
||||
TArray _report;
|
||||
protected:
|
||||
virtual void update();
|
||||
virtual bool on_key(KEY);
|
||||
public:
|
||||
TTestReport(const char* title);
|
||||
~TTestReport() {};
|
||||
void load_report();
|
||||
TString& get_row(int n) {return (TString&)_report[n];}
|
||||
};
|
||||
#endif
|
||||
#ifndef __BA1300_H
|
||||
#define __BA1300_H
|
||||
|
||||
#include "ba1100.h"
|
||||
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#define Separator '\\'
|
||||
#else
|
||||
#define Separator '/'
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////
|
||||
// Here defining classes //
|
||||
////////////////////////////////////////
|
||||
|
||||
class TTestSheet : public TDir_sheet
|
||||
{
|
||||
TBit_array _oldstatus; // Previous status of selected files
|
||||
protected:
|
||||
void page_build(long first, byte rows);
|
||||
public:
|
||||
TTestSheet(const char* titolo, const char* colonne="@1|N.@5|Nome@20|EOD@7|EOX@7|Lung. |Descrizione@43|Flags@7", byte bottoni=0x0);
|
||||
~TTestSheet() ;
|
||||
void sr_status(bool save=TRUE);
|
||||
};
|
||||
|
||||
class TTestFile : public TBaseisamfile
|
||||
{
|
||||
public:
|
||||
TTestFile(int ln,bool lt=TRUE) : TBaseisamfile(ln,lt) {}
|
||||
virtual ~TTestFile() {}
|
||||
int close() {return _close();}
|
||||
int open(unsigned int mode = _manulock) {return _open(mode);}
|
||||
const char * file_name() const {return filename();}
|
||||
};
|
||||
|
||||
class TTestWin : public TIndwin
|
||||
{
|
||||
protected:
|
||||
virtual void update() {update_text();}
|
||||
virtual void handler(WINDOW w, EVENT *e);
|
||||
void update_text() {set_mode(M_COPY); check_stop();}
|
||||
public:
|
||||
void WriteW(short x, short y, const char* line) {stringat(x,y,line);update_text();do_events();}
|
||||
TTestWin();
|
||||
~TTestWin() {};
|
||||
};
|
||||
|
||||
class TTestProc
|
||||
{
|
||||
TTestSheet * _sheet; // Sheet with files selected
|
||||
TTestFile * _workf; // working file
|
||||
TTestWin * _win; // Output window
|
||||
long * _randseq; // Random sequence
|
||||
long _ntest; // number of test in progress
|
||||
int _nfile; // number of file being tested
|
||||
long _kriminal; // number of record incriminated (Debug)
|
||||
int _nkeys; // # of keys defined for current file
|
||||
bool _block; // is test blocked ?
|
||||
bool _rmc; // Remove copies at the end of test ?
|
||||
protected:
|
||||
void do_random(long eod);
|
||||
void filecopy(bool save=TRUE);
|
||||
void DumpReport(int err, long i, long x, int key);
|
||||
long sumop(const long n) {return ((n+1)*(n/2)+(n%2)*((n+1)/2));}
|
||||
int ctrl_keys();
|
||||
bool show_mess(int, int, long, long, int);
|
||||
const char * fmttime(const long);
|
||||
public:
|
||||
TTestProc();
|
||||
~TTestProc();
|
||||
const char* get_base();
|
||||
void do_test_1();
|
||||
void do_test_2();
|
||||
void do_debug();
|
||||
void remove_copy(int n);
|
||||
void load_random(const TString& st);
|
||||
bool stopped() {return _block;}
|
||||
bool rm_copy() {return _rmc;}
|
||||
void set_rmc(bool a=FALSE) {_rmc = a;}
|
||||
long num_test() {return _ntest;}
|
||||
void set_numt(const long num) { _ntest = num;}
|
||||
int num_file() {return _nfile;}
|
||||
void set_file(int n) {_nfile=n;}
|
||||
long number(const long n) {return _randseq[n];}
|
||||
void set_sheet (TTestSheet * sh) {_sheet=sh;}
|
||||
TTestSheet * get_isheet() {return _sheet;}
|
||||
TTestWin * get_win() {return _win;}
|
||||
};
|
||||
|
||||
class TTestReport : public TScroll_window
|
||||
{
|
||||
TArray _report;
|
||||
protected:
|
||||
virtual void update();
|
||||
virtual bool on_key(KEY);
|
||||
public:
|
||||
TTestReport(const char* title);
|
||||
~TTestReport() {};
|
||||
void load_report();
|
||||
TString& get_row(int n) {return (TString&)_report[n];}
|
||||
};
|
||||
#endif
|
||||
|
1206
ba/ba1301.cpp
1206
ba/ba1301.cpp
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user