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

Last change on this file since 104 was 104, checked in by sherbold, 13 years ago
  • improved output in case of wrong startup parameters
  • parameter for application under test now mandatory
  • automatically closes application under test at the end of a session in case it is still open

+ support for multiple sessions in one replay file

File size: 1.2 KB
Line 
1#pragma once
2
3#include "SAXContentHandlerImpl.h"
4#include <string>
5
6#include "WindowData.h"
7
8class LogParser : public SAXContentHandlerImpl
9{
10private:
11        static const int defaultMsgDelay = 2000;
12        WindowData * currentWindow;
13        WindowData * currentParent;
14
15        int msgType;
16        LPARAM lParam;
17        WPARAM wParam;
18
19        boolean useDefaultDelay;
20        int delay;
21
22        void sendMessage(HWND hwnd);
23
24        _TCHAR * runCommand;
25        unsigned int startupTime;
26        HANDLE hProcess;
27
28public:
29        LogParser(_TCHAR * runCommand, unsigned int startupChar, bool useDefaultDelay = false);
30        ~LogParser(void);
31
32        virtual HRESULT STDMETHODCALLTYPE startElement(
33                        wchar_t __RPC_FAR *pwchNamespaceUri,
34                        int cchNamespaceUri,
35                        wchar_t __RPC_FAR *pwchLocalName,
36                        int cchLocalName,
37                        wchar_t __RPC_FAR *pwchRawName,
38                        int cchRawName,
39                        MSXML2::ISAXAttributes __RPC_FAR *pAttributes);
40
41        virtual HRESULT STDMETHODCALLTYPE endElement(
42                        wchar_t __RPC_FAR *pwchNamespaceUri,
43                        int cchNamespaceUri,
44                        wchar_t __RPC_FAR *pwchLocalName,
45                        int cchLocalName,
46                        wchar_t __RPC_FAR *pwchRawName,
47                        int cchRawName);
48
49        std::wstring GetAttributeValue(MSXML2::ISAXAttributes __RPC_FAR *pAttributes,
50                                                           std::wstring name, std::wstring defvalue);
51
52
53        int getDefaultMsgDelay();
54};
Note: See TracBrowser for help on using the repository browser.