Update lua versions
[ryzomcore.git] / nel / tools / misc / log_analyser / LogSessions.cpp
blob1078e03b3940e5fb3e7beeaf2251814a54e59748
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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/>.
17 #include "stdafx.h"
18 #include "log_analyser.h"
19 #include "LogSessions.h"
21 using namespace std;
24 #ifdef _DEBUG
25 #define new DEBUG_NEW
26 #undef THIS_FILE
27 static char THIS_FILE[] = __FILE__;
28 #endif
30 /////////////////////////////////////////////////////////////////////////////
31 // CLogSessions dialog
34 CLogSessions::CLogSessions(CWnd* pParent /*=NULL*/)
35 : CDialog(CLogSessions::IDD, pParent)
37 //{{AFX_DATA_INIT(CLogSessions)
38 m_StartDate = _T("");
39 //}}AFX_DATA_INIT
43 void CLogSessions::DoDataExchange(CDataExchange* pDX)
45 CDialog::DoDataExchange(pDX);
46 //{{AFX_DATA_MAP(CLogSessions)
47 DDX_Control(pDX, IDC_LIST1, m_ListBox);
48 DDX_LBString(pDX, IDC_LIST1, m_StartDate);
49 //}}AFX_DATA_MAP
53 BEGIN_MESSAGE_MAP(CLogSessions, CDialog)
54 //{{AFX_MSG_MAP(CLogSessions)
55 //}}AFX_MSG_MAP
56 END_MESSAGE_MAP()
58 /////////////////////////////////////////////////////////////////////////////
59 // CLogSessions message handlers
65 void CLogSessions::addLogSession( const CString& line )
67 Sessions.push_back( line );
74 CString CLogSessions::getStartDate() const
76 return m_StartDate;
78 /*if ( m_ListBox.GetCurSel() == LB_ERR )
80 return "";
82 else
84 CString res;
85 m_ListBox.GetText( m_ListBox.GetCurSel(), res );
86 return res;
87 }*/
90 BOOL CLogSessions::OnInitDialog()
92 CDialog::OnInitDialog();
94 vector<CString>::iterator il;
95 for (il=Sessions.begin(); il!=Sessions.end(); ++il )
97 m_ListBox.AddString( *il );
99 Sessions.clear();
101 return TRUE;