1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
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/>.
18 // log_analyserDlg.h : header file
21 #include "FilterDialog.h"
22 #include "ViewDialog.h"
23 #include "LogSessions.h"
24 #include "PlugInSelector.h"
28 #if !defined(AFX_LOG_ANALYSERDLG_H__667551B0_360A_43CD_846F_7D02803A822A__INCLUDED_)
29 #define AFX_LOG_ANALYSERDLG_H__667551B0_360A_43CD_846F_7D02803A822A__INCLUDED_
33 #endif // _MSC_VER > 1000
43 class CLAEdit
: public CEdit
48 afx_msg
void OnKeyDown( UINT nChar
, UINT nRepCnt
, UINT nFlags
);
54 /////////////////////////////////////////////////////////////////////////////
55 // CLog_analyserDlg dialog
57 class CLog_analyserDlg
: public CDialog
61 CLog_analyserDlg(CWnd
* pParent
= NULL
); // standard constructor
64 void addView( std::vector
<CString
>& pathNames
);
67 CViewDialog
* onAddCommon( const std::vector
<CString
>& filenames
);
70 void loadPluginConfiguration();
73 bool addPlugIn( const std::string
& dllName
);
76 void displayCurrentLine( const CString
& line
);
79 bool selectText( int lineNum
, int colNum
, int length
);
82 void memorizeFileList( const CString
& str
) { MemorizedFileList
= str
; }
85 void displayFileList();
88 void insertTraceLine( int index
, char *traceLine
);
91 void getLogSeries( const CString
& filenameStr
, std::vector
<CString
>& filenameList
);
94 bool isLogSeriesEnabled() const { return ((CButton
*)GetDlgItem( IDC_CheckAllFileSeries
))->GetCheck() == 1; }
100 void beginResizeView( int index
);
103 CViewDialog
*getCurrentView() { return CurrentView
; }
106 void setCurrentView( int index
) { if ( index
==-1 ) CurrentView
=NULL
; else CurrentView
= Views
[index
]; }
108 //{{AFX_MSG(CLog_analyserDlg)
109 afx_msg
void OnKeyDown(UINT nChar
, UINT nRepCnt
, UINT nFlags
);
113 CFilterDialog FilterDialog
;
115 int ResizeViewInProgress
;
116 std::vector
<CString
> Plugins
;
119 //{{AFX_DATA(CLog_analyserDlg)
120 enum { IDD
= IDD_LOG_ANALYSER_DIALOG
};
121 CScrollBar m_ScrollBar
;
125 // ClassWizard generated virtual function overrides
126 //{{AFX_VIRTUAL(CLog_analyserDlg)
128 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
131 std::vector
<CViewDialog
*> Views
;
132 CViewDialog
* CurrentView
;
134 CLogSessions LogSessionsDialog
;
135 CPlugInSelector PlugInSelectorDialog
;
137 std::multimap
<int, TStampedLine
> TraceMap
;
139 CString MemorizedFileList
;
141 TAnalyseFunc AnalyseFunc
;
147 // Generated message map functions
148 //{{AFX_MSG(CLog_analyserDlg)
149 virtual BOOL
OnInitDialog();
150 afx_msg
void OnPaint();
151 afx_msg HCURSOR
OnQueryDragIcon();
152 afx_msg
void OnAddView();
153 afx_msg
void OnAddtraceview();
154 afx_msg
void OnComputeTraces();
155 afx_msg
void OnVScroll(UINT nSBCode
, UINT nPos
, CScrollBar
* pScrollBar
);
156 afx_msg
void OnReset();
157 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
158 afx_msg
void OnDestroy();
159 afx_msg
void OnHelpBtn();
160 afx_msg
void OnLButtonUp(UINT nFlags
, CPoint point
);
161 afx_msg
void OnDropFiles( HDROP hDropInfo
);
162 afx_msg
void OnDispLineHeaders();
163 afx_msg
void OnAnalyse();
165 DECLARE_MESSAGE_MAP()
170 /// Smart sprintf() (from NeL)
171 int smprintf( char *buffer
, size_t count
, const char *format
, ... );
174 //{{AFX_INSERT_LOCATION}}
175 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
177 #endif // !defined(AFX_LOG_ANALYSERDLG_H__667551B0_360A_43CD_846F_7D02803A822A__INCLUDED_)