Patch level : 2.2 020

Files correlati     : sv0.exe sv1.exe sv2.exe
Ricompilazione Demo : [ ]
Commento            :
Bug 0000138
Implementare la gestione multilingua
E' stato anche velocizzato il programma di statistiche personalizzate.
Andrebbe testato confrontando i rsultati con la 2.0


git-svn-id: svn://10.65.10.50/trunk@12346 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2004-09-27 09:21:34 +00:00
parent a43ce0c3c0
commit 998aaf3603
2 changed files with 18 additions and 0 deletions

View File

@ -705,6 +705,7 @@ const char * add_depcode(TString & codmagdep, const char * d);
const char * get_magcode(TString & codmagdep);
const char * get_depcode(TString & codmagdep);
bool riporta_ordinato();
const TArticolo & cached_articolo(const char * codsrt);
#endif //__MGLIB_H

View File

@ -415,6 +415,23 @@ TArticolo::~TArticolo()
{
}
class TArticoli_cache : public TCache
{
protected:
virtual TObject * key2obj(const char * articolo) { return new TArticolo(articolo); }
public:
const TArticolo & get(const char * articolo) { return *(const TArticolo *) objptr(articolo);}
};
const TArticolo & cached_articolo(const char * articolo)
{
static TArticoli_cache * art_cache = NULL;
if (art_cache == NULL)
art_cache = new TArticoli_cache();
return art_cache->get(articolo);
}
// *****************
// TArticolo_giacenza