-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScriptHandler.h
44 lines (36 loc) · 1.7 KB
/
ScriptHandler.h
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
///////////////////////////////////////////////////////////////////////////////
//
// ScriptHandler.h Author: Eric McDaniel
// Modified: Stephen Chenney
// Date: Fall 2004
//
// Implementation of CScripthandler methods. You should not need to
// modify this file.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _C_SCRIPT_HANDLER
#define _C_SCRIPT_HANDLER
class TargaImage;
class CScriptHandler
{
// methods
public:
///////////////////////////////////////////////////////////////////////////////
//
// Execute the given command string on the given image. If the command
// string could not be parsed, an error message is displayed and false is
// returned. Otherwise return true.
//
///////////////////////////////////////////////////////////////////////////////
static bool HandleCommand(const char* sCommand, TargaImage*& pImage);
///////////////////////////////////////////////////////////////////////////////
//
// The given script file is executed on the given image. If the file is
// not correctly parsed an error message is printed and false is returned.
// Otherwise if all commands in the script execute correctly true is returned,
// otherwise false is returned.
//
///////////////////////////////////////////////////////////////////////////////
static bool HandleScriptFile(const char* sFilename, TargaImage*& pImage);
};// CScriptHandler
#endif // _C_SCRIPT_HANDLER