source: trunk/MFCtooling/replay/LogParser.h @ 163

Last change on this file since 163 was 163, checked in by sherbold, 13 years ago
  • optional parameter -p now sets the working directory of the application under test
File size: 1.5 KB
Line 
1#pragma once
2
3#include "SAXContentHandlerImpl.h"
4#include <string>
5
6#include "WindowData.h"
7#include "TestResults.h"
8
9class LogParser : public SAXContentHandlerImpl
10{
11private:
12        static const int defaultMsgDelay = 500;
13        WindowData * currentWindow;
14        WindowData * currentParent;
15
16        int msgType;
17        LPARAM lParam;
18        WPARAM wParam;
19
20        boolean useDefaultDelay;
21        int delay;
22
23        void sendMessage(HWND hwnd);
24
25        _TCHAR * runCommand;
26        _TCHAR * workingPath;
27        unsigned int startupTime;
28        HANDLE hProcess;
29
30        std::wstring sessionId;
31        RESULT result;
32        unsigned int currentMessage;
33
34        TestResults * results;
35
36        std::wstring expectedValue;
37        std::wstring actualFile;
38        std::wstring expectedFile;
39
40public:
41        LogParser(_TCHAR * runCommand, unsigned int startupChar, TestResults * results, bool useDefaultDelay = false);
42        ~LogParser(void);
43
44        virtual HRESULT STDMETHODCALLTYPE startElement(
45                        wchar_t __RPC_FAR *pwchNamespaceUri,
46                        int cchNamespaceUri,
47                        wchar_t __RPC_FAR *pwchLocalName,
48                        int cchLocalName,
49                        wchar_t __RPC_FAR *pwchRawName,
50                        int cchRawName,
51                        MSXML2::ISAXAttributes __RPC_FAR *pAttributes);
52
53        virtual HRESULT STDMETHODCALLTYPE endElement(
54                        wchar_t __RPC_FAR *pwchNamespaceUri,
55                        int cchNamespaceUri,
56                        wchar_t __RPC_FAR *pwchLocalName,
57                        int cchLocalName,
58                        wchar_t __RPC_FAR *pwchRawName,
59                        int cchRawName);
60
61        std::wstring GetAttributeValue(MSXML2::ISAXAttributes __RPC_FAR *pAttributes,
62                                                           std::wstring name, std::wstring defvalue);
63
64
65        int getDefaultMsgDelay();
66
67        void setWorkingPath(TCHAR * workingPath);
68};
Note: See TracBrowser for help on using the repository browser.