/** @(#) utilpos/interfacepos.h */
/**
* Funciones para entrada y salida del usuario.
* @author Omar Posada Villarreal
* @version 1.3, 03/04/2002 LOG, WAIT
* @version 1.2, 07/01/2002 boolString()
* @version 1.1, 27/12/2001 getString()
* @version 1.0, 08/12/2001
*/

#ifndef INTERFACEPOS_H
#define INTERFACEPOS_H
//----------------------------------------------------------------------------
#include <iostream>
#include <string>
using namespace std;

/* Si para todo el archivo MAX_LOG
* 0: no muestra nada
* 1: short log
* 2: long log
* Uso:
* LLOG << "|nSe uso Dogleg step";
* Cambiarlo por el programador. */
// VARIABLE GLOBAL QUE DEBE SER CAMBIADA POR EL MAIN()
const int NO_LOG = 0;
const int FILE_LOG = 1;
const int SHORT_LOG = 2;
const int LONG_LOG = 3;

const int NO_WAIT = 0;
const int SHORT_WAIT = 2;
const int LONG_WAIT = 3;

#define SWAIT()	if (waitType >= SHORT_WAIT) waitEnter()
#define LWAIT()	if (waitType >= LONG_WAIT) waitEnter()

// Necesita de parametro: int logtype, int waitType.
// var local: ofstream outFile
// FLOG no muestra en pantalla, solo a archivo
#define FLOG if (logType == FILE_LOG) outFile
// Si LONG_LOG, muestra SLOG y LLOG
#define SLOG if (logType >= SHORT_LOG) cout
#define LLOG if (logType >= LONG_LOG) cout

/**
* Funciones para entrada y salida del usuario.
* @author Omar Posada Villarreal
* @version 1.0, 08/12/2001
*/
char *stringToCharArray(string s);
void waitEnter();
void getString(const string message, string &theString);
string boolString(bool var);

//----------------------------------------------------------------------------
#endif
// Fin------------------------------------------------------------------------