1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD><style> A { color:black }</style>
<!-- hennerik CVSweb $Revision: 1.93 $ -->
<TITLE>code/nelns/agent_service/io_interface.cpp - view - 1.1</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee">
<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="io_interface.cpp?hideattic=0"><IMG SRC="/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="io_interface.cpp?hideattic=0">io_interface.cpp</A>
CVS log</b> <IMG SRC="/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?hideattic=0">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?hideattic=0">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?hideattic=0">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/agent_service/?hideattic=0">agent_service</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?hideattic=0">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?hideattic=0">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?hideattic=0">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/agent_service/?hideattic=0">agent_service</a> / <a href="/cvs/cvsweb.cgi/code/nelns/agent_service/Attic/?hideattic=0">Attic</a> / <a href="/cvs/cvsweb.cgi/code/nelns/agent_service/Attic/io_interface.cpp?hideattic=0">io_interface.cpp</a> (<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/agent_service/Attic/io_interface.cpp?rev=1.1&hideattic=0" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/agent_service/Attic/io_interface.cpp?rev=1.1','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
Revision <B>1.1</B>, <i>Wed Apr 18 13:54:25 2001 UTC</i> (15 months, 1 week ago) by <i>valignat</i>
<BR>Branch: <b>MAIN</b>
<PRE>
RENAMED code/server to code/nelns.
</PRE>
</td></tr></table><HR noshade><PRE>#include "nel/ai/agent/agent.h"
#include "io_interface.h"
#include <stdio.h>
#include <stdarg.h>
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;
}
}
</PRE>
|