Version: 0.6.0
datacontainer.h
1 /******************************************************************************
2  * Project: wxGIS
3  * Purpose: datacontainer Folder, GeoDatabase & etc.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2014 Dmitry Baryshnikov
7 * Copyright (C) 2014 NextGIS
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  ****************************************************************************/
22 
23 #pragma once
24 
25 #include "wxgis/datasource/dataset.h"
26 
33 class WXDLLIMPEXP_GIS_DS wxGISDataSource :
34  public wxGISDataset
35 {
36  DECLARE_CLASS(wxGISDataSource)
37 public:
38  wxGISDataSource(const CPLString &szPath);
39  virtual ~wxGISDataSource(void);
40 
41  //wxGISDataset
42  virtual void Close(void);
43  virtual size_t GetSubsetsCount(void) const;
44  virtual wxGISDataset* GetSubset(size_t nIndex);
45  virtual wxGISDataset* GetSubset(const wxString &sTableName);
46  virtual wxString GetName(void) const;
47  virtual bool Open(bool bUpdate = true, bool bShared = true);
48 
49  //wxGISDataset
50  virtual bool Rename(const wxString &sNewName, ITrackCancel* const pTrackCancel = NULL);
51  virtual bool Copy(const CPLString &szDestPath, ITrackCancel* const pTrackCancel = NULL);
52  virtual bool Move(const CPLString &szDestPath, ITrackCancel* const pTrackCancel = NULL);
53  virtual void Cache(ITrackCancel* const pTrackCancel = NULL);
54  virtual char **GetFileList();
55  //
56  virtual OGRCompatibleDataSource* const GetDataSourceRef(void) const { return m_poDS; };
57 protected:
58  wxGISDataset* GetDatasetFromOGRLayer(const CPLString &sPath, OGRLayer* poLayer);
59 protected:
60  OGRCompatibleDataSource *m_poDS;
61  wxString m_sDBName;
62 };
A TrackCancel interface class.
Definition: core.h:144
Definition: datacontainer.h:33
Definition: dataset.h:33