Version: 0.6.0
gxarchfolder.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: wxGxArchive 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/gxfolder.h"
23 
31 class WXDLLIMPEXP_GIS_CLT wxGxArchiveFolder :
32  public wxGxFolder
33 {
34  DECLARE_CLASS(wxGxArchiveFolder)
35 public:
36  wxGxArchiveFolder(void);
37  wxGxArchiveFolder(wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
38  virtual ~wxGxArchiveFolder(void);
39  //wxGxObject
40  virtual wxString GetCategory(void) const {return wxString(_("Archive folder"));};
41  //IGxObjectEdit unsupported yet
42  virtual bool CanDelete(void){return false;};
43  virtual bool CanRename(void){ return false; };
44  //wxGxArchiveFolder
45 protected:
46  virtual wxGxObject* GetArchiveFolder(wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
47  virtual void LoadChildren(void);
48  virtual bool IsArchive(void) const;
49 };
50 
58 class WXDLLIMPEXP_GIS_CLT wxGxArchive :
59  public wxGxArchiveFolder
60 {
61  DECLARE_CLASS(wxGxArchive)
62 public:
63  wxGxArchive(wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
64  virtual ~wxGxArchive(void);
65  //wxGxObject
66  virtual wxGxObject *FindGxObjectByPath(const wxString &sPath); //search by Path stored in CPLString sPath
67  //IGxObject
68  virtual wxString GetBaseName(void) const;
69  virtual wxString GetCategory(void) const {return wxString(_("Archive"));};
70  //IGxObjectEdit
71  virtual bool Delete(void);
72  virtual bool CanDelete(void){return true;};
73  virtual bool Rename(const wxString &sNewName);
74  virtual bool CanRename(void){return true;};
75  virtual bool Copy(const CPLString &szDestPath, ITrackCancel* const pTrackCancel);
76  virtual bool Move(const CPLString &szDestPath, ITrackCancel* const pTrackCancel);
77 protected:
78  virtual CPLString GetRealPath() const;
79 };
80 
81 
Definition: gxfolder.h:33
Definition: gxarchfolder.h:31
A TrackCancel interface class.
Definition: core.h:144
Definition: gxarchfolder.h:58
Definition: gxobject.h:37