#include "nel/ai/agent/agent.h" #include "io_interface.h" #include #include namespace SRV { extern std::fstream logStream; extern bool logFileState; static char LaseErrorCodeOrdreInterprete[32*1024]; void IOTrace::Echo(char *str, ...) { char temp[32*1024]; va_list argument; va_start (argument, str); vsprintf(temp, str, argument); strcpy(LaseErrorCodeOrdreInterprete,temp); #ifdef NL_DEBUG printf("%s",LaseErrorCodeOrdreInterprete); if(logFileState && logStream.is_open()) { logStream << LaseErrorCodeOrdreInterprete; logStream.flush(); } #else printf("%s",LaseErrorCodeOrdreInterprete); if(logFileState && logStream.is_open()) { logStream << LaseErrorCodeOrdreInterprete; logStream.flush(); } #endif } const std::string IOTrace::InPut() { std::string str; /*char toto[4096]; str = gets(toto);*/ cin >> str; return str; } const NLAIC::CIdentType &IOTrace::getType() const { static const NLAIC::CIdentType idIOWinInterface("IOWinInterface", NLAIC::CSelfClassFactory(*this), NLAIC::CTypeOfObject(NLAIC::CTypeOfObject::tObject),NLAIC::CTypeOfOperator(0)); return idIOWinInterface; } }