campo-sirio/include/sortfld.h

47 lines
1001 B
C++
Executable File

#ifndef __SORTFLD_H
#define __SORTFLD_H
#ifndef __OBJECT_H
#include <object.h>
#endif
/*
@(SH) Header
@(C#) PUBBLICHE
@(C$) PRIVATE
@(VG#) PUBBLICHE
@(VG$) PRIVATE
-------------------------------------------------------------------------------
*/
// @C
// Classe TSort_field : public TObject
// @END
class TSort_field : public TObject
{
protected:
// @DPROT
int pos;
int len;
char ad;
public:
// @FPUB
virtual const char* class_name() const pure;
virtual void print_on(ostream& out) const pure;
virtual void read_from(istream&) {};
virtual bool equal(const TObject&) const pure;
virtual bool ok() const pure;
TSort_field(int pos = -1, int len = 0, char ad = 'a');
set(int pos, int len, char ad); // Setta posizione lunghezza e verso
int position() { return f_pos; } // Ritorna prima posizione del campo
int lenght() { return f_len; } // Ritorna lunghezza del campo e tipo
char direction() { return ad; } // Ritorna verso dell'ordinamento
};
#endif // __SORTFLD_H