Aggiunta la add con puntatore a TTracciato_record
git-svn-id: svn://10.65.10.50/trunk@5288 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									027467de50
								
							
						
					
					
						commit
						eb223fa499
					
				@ -49,6 +49,11 @@ void TTracciato_record::add(const TTracciato_campo& tc, int pos)
 | 
			
		||||
  _tracciati_campo.add(tc,pos);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TTracciato_record::add(TTracciato_campo* tc, int pos)
 | 
			
		||||
{
 | 
			
		||||
  _tracciati_campo.add(tc,pos);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int TTracciato_record::get_pos(const char* name) const
 | 
			
		||||
{
 | 
			
		||||
  for (int i = _tracciati_campo.last(); i >= 0; i = _tracciati_campo.pred(i))
 | 
			
		||||
@ -65,7 +70,7 @@ TTracciato_campo& TTracciato_record::get(int n)
 | 
			
		||||
  if (TTracciato_record::ptr(n) == NULL)//se non esiste lo creo
 | 
			
		||||
  {
 | 
			
		||||
    TTracciato_campo* t = new TTracciato_campo();
 | 
			
		||||
    TTracciato_record::add(*t, n);
 | 
			
		||||
    add(t, n);
 | 
			
		||||
  }  
 | 
			
		||||
  return (TTracciato_campo&)_tracciati_campo[n];  
 | 
			
		||||
}
 | 
			
		||||
@ -110,7 +115,10 @@ void TFile_text::set_type_parm(TConfig& config, TString& section)
 | 
			
		||||
  tipo.set_decimal(config.get_int("DECIMAL", section));
 | 
			
		||||
  tipo.set_align(config.get_char("ALIGN", section));
 | 
			
		||||
  TString s  = config.get("FILLER", section); 
 | 
			
		||||
  if (s.len() > 1)
 | 
			
		||||
    tipo.set_filler(s[1]);
 | 
			
		||||
  else
 | 
			
		||||
    tipo.set_filler(s[0]);
 | 
			
		||||
  tipo.set_picture(config.get("PICTURE", section));
 | 
			
		||||
  _tipi.add(lavoro, tipo);// aggiungo il tracciato campo all'assoc_array dei tipi predefiniti
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -77,6 +77,7 @@ public:
 | 
			
		||||
  const TString& type() const {return _type;}
 | 
			
		||||
  void set_type(const TString& type) {_type = type;}                                                        
 | 
			
		||||
  void add(const TTracciato_campo& tc, int pos = -1);//aggiunge tracciato campo all'array 
 | 
			
		||||
  void add(TTracciato_campo* tc, int pos = -1);//aggiunge tracciato campo all'array 
 | 
			
		||||
  TTracciato_campo& get(int n);//ritorna il tracciato campo n dell'array (se non c'e' lo crea)     
 | 
			
		||||
  //ritorna il tracciato campo n dell'array 
 | 
			
		||||
  const TTracciato_campo& get(int n) const {return (TTracciato_campo&)_tracciati_campo[n];}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user