50 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
#ifndef __SORT_H
 | 
						|
#define __SORT_H
 | 
						|
 | 
						|
#ifndef __OBJECT_H
 | 
						|
#include        <object.h>
 | 
						|
#endif 
 | 
						|
 | 
						|
#ifndef __ISAM_H
 | 
						|
#include        <isam.h>
 | 
						|
#endif 
 | 
						|
 | 
						|
/*
 | 
						|
   @(SH) Header
 | 
						|
 | 
						|
   @(C#) PUBBLICHE
 | 
						|
 | 
						|
   @(C$) PRIVATE
 | 
						|
   @(VG#) PUBBLICHE
 | 
						|
   @(VG$) PRIVATE
 | 
						|
   */
 | 
						|
 | 
						|
// @C
 | 
						|
// Classe TSort
 | 
						|
// @END
 | 
						|
 | 
						|
class TSort : public TObject
 | 
						|
{
 | 
						|
  // @DPRIV
 | 
						|
  friend TRecfield; 
 | 
						|
  struct s_prm* _sortvar;       // Puntatore alla struttura di un sort
 | 
						|
  int   nsortkey;       // Indice nella tabella dei campi della chiave
 | 
						|
public:
 | 
						|
  // @FPUB
 | 
						|
  void init();  // Chiama init_sort
 | 
						|
  void sort(const char * record); // Chiama sort (record)
 | 
						|
  void endsort();       // Chiama sort (NULL)
 | 
						|
  const char* retrieve(); // Chiama sort_op()
 | 
						|
  void stats();                 // Chiama sort_stats
 | 
						|
 | 
						|
  int length() const;   // Ritorna la lunghezza del record di sort 
 | 
						|
  void reset(int len);  // Imposta la lunghezza del record di sort 
 | 
						|
  // e inizializza il sort 
 | 
						|
  void addsortkey(int pos, int len, char direction = 'a');
 | 
						|
  void addsortkey(TRecfield& f, char direction = 'a');
 | 
						|
 | 
						|
  TSort(int reclen = 0);
 | 
						|
  virtual ~TSort();
 | 
						|
};
 | 
						|
#endif // __SORT_H
 |