Dayz Explorer
1.29.162510
Loading...
Searching...
No Matches
pluginlocalhistorybase.c
Go to the documentation of this file.
1
class
PluginLocalHistoryBase
extends
PluginFileHandler
2
{
3
void
PluginLocalHistoryBase()
4
{
5
m_ReadOnly =
false
;
6
}
7
8
void
~PluginLocalHistoryBase()
9
{
10
}
11
12
override
void
OnInit
()
13
{
14
super.OnInit();
15
}
16
17
override
string
GetFileName
()
18
{
19
Error
(
"Cannot call GetFileName on Base class PluginLocalHistoryBase"
);
20
return
STRING_EMPTY
;
21
}
22
23
void
AddNewLine(
string
text)
24
{
25
// replace newline to \\n
26
text.Replace(
"\n"
,
"\\n"
);
27
m_FileContent.Insert(text);
28
SaveFile();
29
}
30
31
TStringArray
GetAllLines()
32
{
33
// replace \\n to new line
34
TStringArray
console_history =
new
TStringArray
;
35
for
(
int
i = 0; i < m_FileContent.Count(); i++)
36
{
37
string
history_record = m_FileContent.Get(i);
38
history_record.Replace(
"\\n"
,
"\n"
);
39
console_history.Insert( history_record );
40
}
41
return
console_history;
42
}
43
44
TStringArray
GetLastLine()
45
{
46
int
count = m_FileContent.Count();
47
string
ret =
""
;
48
49
if
( count > 0 )
50
{
51
ret = m_FileContent.Get(count - 1);
52
}
53
54
return
NULL;
55
}
56
}
PluginFileHandler
Definition
pluginconfighandler.c:2
PluginLocalHistoryBase
Definition
pluginlocalenscripthistory.c:2
Error
void Error(string err)
Messagebox with error message.
Definition
endebug.c:90
TStringArray
array< string > TStringArray
Definition
enscript.c:712
OnInit
void OnInit()
Callback for user defined initialization. Called for all suites during TestHarness....
Definition
freezestate.c:81
STRING_EMPTY
const string STRING_EMPTY
Definition
constants.c:54
GetFileName
override string GetFileName()
Definition
pluginlocalenscripthistory.c:26
Daten
4_world
plugins
pluginbase
pluginfilehandler
pluginlocalhistorybase.c
Generated by
1.16.1