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

Last change on this file since 356 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
RevLine 
[32]1#pragma once
2
3#include "SAXContentHandlerImpl.h"
4#include <string>
5
6#include "WindowData.h"
[105]7#include "TestResults.h"
[32]8
9class LogParser : public SAXContentHandlerImpl
10{
11private:
[142]12        static const int defaultMsgDelay = 500;
[32]13        WindowData * currentWindow;
14        WindowData * currentParent;
15
16        int msgType;
17        LPARAM lParam;
18        WPARAM wParam;
19
[104]20        boolean useDefaultDelay;
[32]21        int delay;
22
23        void sendMessage(HWND hwnd);
24
[104]25        _TCHAR * runCommand;
[163]26        _TCHAR * workingPath;
[104]27        unsigned int startupTime;
28        HANDLE hProcess;
29
[105]30        std::wstring sessionId;
31        RESULT result;
32        unsigned int currentMessage;
33
34        TestResults * results;
35
[142]36        std::wstring expectedValue;
37        std::wstring actualFile;
38        std::wstring expectedFile;
39
[32]40public:
[105]41        LogParser(_TCHAR * runCommand, unsigned int startupChar, TestResults * results, bool useDefaultDelay = false);
[32]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();
[163]66
67        void setWorkingPath(TCHAR * workingPath);
[32]68};
Note: See TracBrowser for help on using the repository browser.