Version: 0.6.0
gxfile.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: wxGxFile classes.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009-2011,2013,2014 Dmitry Baryshnikov
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 #include "wxgis/catalog/gxobject.h"
23 #include "wxgis/datasource/datasource.h"
24 #include "wxgis/datasource/gdalinh.h"
25 
33 class WXDLLIMPEXP_GIS_CLT wxGxFile :
34  public wxGxObject,
35  public IGxObjectEdit
36 {
37  DECLARE_CLASS(wxGxFile)
38 public:
39  wxGxFile(wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
40  virtual ~wxGxFile(void);
41  //IGxObjectEdit
42  virtual bool Delete(void);
43  virtual bool CanDelete(void) { return true; };
44  virtual bool Rename(const wxString& NewName);
45  virtual bool CanRename(void) { return true; };
46  virtual bool Copy(const CPLString &szDestPath, ITrackCancel* const pTrackCancel);
47  virtual bool CanCopy(const CPLString &szDestPath) { return true; };
48  virtual bool Move(const CPLString &szDestPath, ITrackCancel* const pTrackCancel);
49  virtual bool CanMove(const CPLString &szDestPath) {return CanCopy(szDestPath) & CanDelete();};
50 };
51 
59 class WXDLLIMPEXP_GIS_CLT wxGxPrjFile :
60  public wxGxFile
61 {
62  DECLARE_CLASS(wxGxPrjFile)
63 public:
64  wxGxPrjFile(wxGISEnumPrjFileType eType, wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
65  virtual ~wxGxPrjFile(void);
66  //wxGxObject
67  virtual wxString GetCategory(void) const {return wxString(_("Coordinate System"));};
68  //wxGxPrjFile
69  virtual wxGISSpatialReference GetSpatialReference(void);
70 protected:
71  wxGISEnumPrjFileType m_eType;
72  wxGISSpatialReference m_SpatialReference;
73 };
74 
82 class WXDLLIMPEXP_GIS_CLT wxGxTextFile :
83  public wxGxFile
84 {
85  DECLARE_CLASS(wxGxTextFile)
86 public:
87  wxGxTextFile(wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
88  virtual ~wxGxTextFile(void);
89  //wxGxObject
90  virtual wxString GetCategory(void) const {return wxString(_("Text file"));};
91 };
Definition: gxfile.h:82
A TrackCancel interface class.
Definition: core.h:144
Definition: gxfile.h:33
Definition: gxfile.h:59
Definition: gdalinh.h:57
Definition: catalog.h:51
Definition: gxobject.h:37