#ifndef __TABUTIL_H
#define __TABUTIL_H

#ifndef __ISAM_H
#include <isam.h>
#endif 

/*
   @(SH) Header

   @(C#) PUBBLICHE

   @(C$) PRIVATE
   @(VG#) PUBBLICHE
   @(VG$) PRIVATE
   */

// @C
// Classe TTable : public TLocalisamfile
// @END

class TTable : public TLocalisamfile
{
  // @DPRIV
  TString16 _tabname;
  TRecfield _cod;

public:
  // @FPUB
  virtual int first(word lockop = _nolock);
  virtual int last(word lockop = _nolock);
  virtual int next(word lockop = _nolock);
  virtual int prev(word lockop = _nolock);
  virtual int skip(TRecnotype nrec, word lockop = _nolock);
  virtual int read(word op = _isequal, word lockop = _nolock, TDate& = (TDate&)botime);
  virtual int read(TRectype& rec, word op = _isequal, word lockop = _nolock, TDate& = (TDate&)botime);
  virtual int readat(TRecnotype nrec, word lockop = _nolock);
  virtual int readat(TRectype& rec, TRecnotype nrec, word lockop = _nolock);
  virtual bool tab() const { return TRUE; }
  virtual const char* name() const { return _tabname;}

  TTable(const char* tabname, bool linkrecinst = FALSE);
  virtual ~TTable();

  static int name2log(const char* tabname);
};


#endif // __TABUTIL_H
