File: ThreadSearchLoggerBase.cpp

package info (click to toggle)
codeblocks 10.05-2.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 41,516 kB
  • sloc: cpp: 334,954; ansic: 26,117; sh: 10,395; xml: 5,273; asm: 3,827; makefile: 3,821; python: 163
file content (44 lines) | stat: -rw-r--r-- 1,439 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/***************************************************************
 * Name:      ThreadSearchLoggerBase
 * Purpose:   ThreadSearchLoggerBase is used to search text files
 *            for text pattern.
 * Author:    Jerome ANTOINE
 * Created:   2007-04-07
 * Copyright: Jerome ANTOINE
 * License:   GPL
 **************************************************************/

#include "ThreadSearchLoggerBase.h"
#include "ThreadSearchLoggerList.h"
#include "ThreadSearchLoggerTree.h"
#include "ThreadSearch.h"

ThreadSearchLoggerBase* ThreadSearchLoggerBase::BuildThreadSearchLoggerBase(ThreadSearchView& threadSearchView,
																			ThreadSearch&     threadSearchPlugin,
																			eLoggerTypes      loggerType,
															 InsertIndexManager::eFileSorting fileSorting,
																			wxPanel*          pParent,
																			long              id)
{
	ThreadSearchLoggerBase* pLogger = NULL;

	if ( loggerType == TypeList )
	{
		pLogger = new ThreadSearchLoggerList(threadSearchView, threadSearchPlugin, fileSorting , pParent, id);
	}
	else
	{
		pLogger = new ThreadSearchLoggerTree(threadSearchView, threadSearchPlugin, fileSorting , pParent, id);
	}
	return pLogger;
}


void ThreadSearchLoggerBase::Update()
{
	if ( m_ThreadSearchPlugin.GetFileSorting() != m_IndexManager.GetFileSorting() )
	{
		Clear();
		m_IndexManager.SetFileSorting(m_ThreadSearchPlugin.GetFileSorting());
	}
}