Version: 0.6.0
gptool.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Toolbox)
3  * Purpose: base geoprocessing tool.
4  * Author: Baryshnikov Dmitriy (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009,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 
22 #pragma once
23 
24 #include "wxgis/geoprocessing/geoprocessing.h"
25 
29 #define GPTOOLSEPARATOR wxT("|")
30 
31 int CPL_STDCALL ExecToolProgress( double dfComplete, const char *pszMessage, void *pData);
32 
40 class WXDLLIMPEXP_GIS_GP wxGISGPTool :
41  public IGPTool,
42  public wxObject
43 {
44 public:
46  wxGISGPTool(void);
48  virtual ~wxGISGPTool(void);
49  //IGPTool
51  virtual const wxString GetDisplayName(void) = 0;
53  virtual const wxString GetName(void) = 0;
55  virtual const wxString GetCategory(void) = 0;
64  virtual bool Execute(ITrackCancel* pTrackCancel) = 0;
66  virtual bool Validate(void) = 0;
68  virtual GPParameters GetParameterInfo(void) = 0;
73  virtual void SetCatalog(IGxCatalog* pCatalog);
75  virtual IGxCatalog* const GetCatalog(void);
77  virtual const wxString GetAsString(void);
79  virtual bool SetFromString(const wxString& sParams);
84  virtual void Copy(IGPTool* const pTool);
85  //TODO: export/import tool to XML for server execution
86 protected:
87  GPParameters m_paParam;
88  IGxCatalog* m_pCatalog;
89 };
Definition: gptool.h:40
A TrackCancel interface class.
Definition: core.h:144