Patch level : 10.0

Files correlati     : lv2
Ricompilazione Demo : [ ]
Commento            :
Ottimizzazioni minori ma eleganti


git-svn-id: svn://10.65.10.50/trunk@19234 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-08-28 13:40:26 +00:00
parent f8a5e36e8a
commit e85d90e7f7
2 changed files with 12 additions and 17 deletions

View File

@ -84,7 +84,7 @@ public:
//CREATE: metodo costruttore
bool TGenera_documenti_app::create()
{
open_files(LF_DOC, 34, 0);
open_files(LF_DOC, LF_RIGHEDOC, 0);
_msk = new TGenera_documenti_mask("lv2400a");
_ndoc = 0;
@ -503,8 +503,9 @@ bool TGenera_documenti_app::numerazione_ddt(TString& codnum, TString& tpdoc, TSt
//instanzio una cache sulla tabella dei tipi documento (cerco lo stato iniziale)
statoi = cache().get("%TIP",tpdoc,"S2").left(1);
statof = cache().get("%TIP",tpdoc,"S2").mid(1,1);
const TString& s2 = cache().get("%TIP",tpdoc,"S2");
statoi = s2.left(1);
statof = s2.mid(1,1);
return codnum.full() && tpdoc.full();
}
@ -512,16 +513,12 @@ bool TGenera_documenti_app::numerazione_ddt(TString& codnum, TString& tpdoc, TSt
//NUMERAZIONE_DRIT: questa funzione cerca quali sono i codnum e i tpdoc dei documenti di ritiro
bool TGenera_documenti_app::numerazione_drit(const int cod, TString& codnum, TString& tpdoc, TString& statoi, TString& statof) const
{
TString16 tmp;
tmp << "NUM_RIT(" << cod << ")";
codnum = _configlv->get(tmp);
tmp.cut(0);
tmp << "TIPODOC_RIT(" << cod << ")";
tpdoc = _configlv->get(tmp);
codnum = _configlv->get("NUM_RIT", NULL, cod);
tpdoc = _configlv->get("TIPODOC_RIT", NULL, cod);
//instanzio una cache sulla tabella tipi documento (cerco lo stato iniziale)
statoi = cache().get("%TIP",tpdoc,"S2").left(1);
statof = cache().get("%TIP",tpdoc,"S2").mid(1,1);
const TString& s2 = cache().get("%TIP",tpdoc,"S2");
statoi = s2.left(1);
statof = s2.mid(1,1);
return codnum.full() && tpdoc.full();
}
@ -532,8 +529,9 @@ bool TGenera_documenti_app::numerazione_dant(const int cod, TString& codnum, TSt
codnum = _configlv->get("NUM_ANT",NULL,cod);
tpdoc = _configlv->get("TIPODOC_ANT",NULL,cod);
//instanzio una cache sulla tabella delle righe contratti (cerco lo stato iniziale)
statoi = cache().get("%TIP",tpdoc,"S2").left(1);
statof = cache().get("%TIP",tpdoc,"S2").mid(1,1);
const TString& s2 = cache().get("%TIP",tpdoc,"S2");
statoi = s2.left(1);
statof = s2.mid(1,1);
return codnum.full() && tpdoc.full();
}

View File

@ -172,8 +172,6 @@ TAcquisizione_cache::TAcquisizione_cache() : TCache(17)
class TAcquisizione_lavanderie_app : public TSkeleton_application
{
TAcquisizione_msk* _msk;
protected:
virtual bool create();
@ -181,7 +179,6 @@ protected:
void elabora_file(const TString& file, TLog_report &rep);
public:
bool transfer();
virtual void main_loop();