Version: 0.6.0
processmain.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Toolbox)
3  * Purpose: Main application class.
4  * Author: Bishop (aka Baryshnikov Dmitriy), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2010,2011 Bishop
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wxgis/core/init.h"
24 #include "wxgis/geoprocess/geoprocess.h"
25 
26 #include <wx/string.h>
27 #include <wx/wfstream.h>
28 #include <wx/txtstrm.h>
29 #include <wx/ffile.h>
30 
31 bool parse_commandline_parameters( wxCmdLineParser& parser );
32 int main(int argc, char** argv);
33 
39  public ITrackCancel,
40  public IProgressor,
41  public wxGISInitializer
42 {
43 public:
44  wxGPTaskExecutor(void);
45  virtual ~wxGPTaskExecutor(void);
46  // wxGPTaskExecutor
47  virtual bool OnExecute(wxString sToolName, wxString sToolParameters);
48  // ITrackCancel
49  virtual void PutMessage(wxString sMessage, size_t nIndex, wxGISEnumMessageType nType);
50  // IProgressor
51  virtual void SetValue(int value);
52  virtual int GetValue(void){return m_nValue;};
53  virtual bool Show(bool bShow){return true;};
54  virtual void SetRange(int range){m_nRange = range;};
55  virtual int GetRange(void){return m_nRange;};
56  virtual void Play(void){};
57  virtual void Stop(void){};
58  virtual void SetYield(bool bYield = false){};
59  //wxGISInitializer
60  virtual bool Initialize(const wxString &sAppName, const wxString &sLogFilePrefix, wxCmdLineParser& parser);
61  virtual void Uninitialize();
62 protected:
63  int m_nValue;
64  int m_nRange;
65  wxTextOutputStream* m_pOutTxtStream;
66  wxFFile m_StdOutFile;
67  wxString m_sPrevMsg;
68 };
virtual void SetRange(int range)
Set progressor range.
Definition: processmain.h:54
A TrackCancel interface class.
Definition: core.h:144
virtual void Play(void)
Start undefined progressor state.
Definition: processmain.h:56
The geoprocessing task exec class.
Definition: processmain.h:38
virtual void SetValue(int value)
Set progressor position.
Definition: processmain.cpp:249
virtual void Stop(void)
Stop undefined progressor state.
Definition: processmain.h:57
Definition: core.h:86
virtual void SetYield(bool bYield=false)
SetYield Yields control to pending messages in the windowing system.
Definition: processmain.h:58