1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef PATCHMAN_TESTER_H
18 #define PATCHMAN_TESTER_H
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
25 #include "nel/misc/sstring.h"
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
34 //-----------------------------------------------------------------------------
35 // class CPatchmanTester
36 //-----------------------------------------------------------------------------
41 virtual ~CPatchmanTester() {}
43 // this is a singleton so it has a getInstance() method to get to the singleton instance
44 static CPatchmanTester
& getInstance();
46 // public interface...
49 virtual void clear() =0;
51 // clear loaded script(s) but leave state intact
52 virtual void clearScript() =0;
54 // clear state variables but leave scripts intact
55 virtual void clearState() =0;
58 virtual void loadScript(const NLMISC::CSString
& fileName
) =0;
60 // set a state variable
61 virtual void set(const NLMISC::CSString
& variableName
,const NLMISC::CSString
& value
) =0;
62 virtual void set(const NLMISC::CSString
& variableName
,sint32 value
) =0;
65 virtual void trigger(const NLMISC::CSString
& eventName
) =0;
67 // debug routine - display internal state info
68 virtual void dump(NLMISC::CLog
& log
) =0;
70 // debugging routine - displays the syntax help for the patchtest script files
71 virtual void help(NLMISC::CLog
& log
) =0;