/* itgcorp.h
 *
 * $Id: itgcorp.h,v 1.4 2007/12/06 14:05:28 post Exp $
 */

#ifndef ITGCORP_H
#define ITGCORP_H

#include <string>
#include <cstdio>
#include "globals.h"

using namespace std;

class ITGCorp  
{
 public:
  FILE *ef;
  FILE *cf;
  string host;
  int port;

  ITGCorp(char *efname, char *cfname, char mode);
  ITGCorp(char *efname, char mode);
  ~ITGCorp();
  int retrieve_net(WORDTYPE **, int *elen, int emax, WORDTYPE **carray, int *clen, int cmax);
  int retrieve(WORDTYPE **earray, int *elen, int emax, WORDTYPE **carray, int *clen, int cmax);
  int retrieve(WORDTYPE **carray, int *clen, int cmax);
  int reset();
 private:
  int fillin(WORDTYPE **dest, string buf, int *len, int max);
};

#endif
