From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- .../plain&hideattic=0/index.html | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 cvs/cvsweb.cgi/~checkout~/code/nelns/agent_service/Attic/io_interface.cpp?rev=1.1&content-type=text/plain&hideattic=0/index.html (limited to 'cvs/cvsweb.cgi/~checkout~/code/nelns/agent_service/Attic/io_interface.cpp?rev=1.1&content-type=text/plain&hideattic=0/index.html') diff --git a/cvs/cvsweb.cgi/~checkout~/code/nelns/agent_service/Attic/io_interface.cpp?rev=1.1&content-type=text/plain&hideattic=0/index.html b/cvs/cvsweb.cgi/~checkout~/code/nelns/agent_service/Attic/io_interface.cpp?rev=1.1&content-type=text/plain&hideattic=0/index.html new file mode 100644 index 00000000..2cfd6fb4 --- /dev/null +++ b/cvs/cvsweb.cgi/~checkout~/code/nelns/agent_service/Attic/io_interface.cpp?rev=1.1&content-type=text/plain&hideattic=0/index.html @@ -0,0 +1,54 @@ +#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; + } +} -- cgit v1.2.1