Version: 0.6.0
gxlocaldb.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: local db (sqlite, gdab, mdb) classes.
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 #pragma once
23 #include "wxgis/catalog/gxfolder.h"
24 #include "wxgis/catalog/gxdataset.h"
25 
33 class WXDLLIMPEXP_GIS_CLT wxGxOpenFileGDB :
35 {
36  DECLARE_CLASS(wxGxOpenFileGDB)
37 public:
38  wxGxOpenFileGDB(wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
39  virtual ~wxGxOpenFileGDB(void);
40  //wxGxObject
41  virtual wxString GetCategory(void) const {return wxString(_("File geodatabase"));};
42  //wxGxObjectContainer
43  virtual bool CanCreate(long nDataType, long DataSubtype);
44  virtual bool AreChildrenViewable(void) const;
45  virtual bool HasChildren(void);
46  //IGxDataset
47  virtual wxGISDataset* const GetDataset(bool bCached = true, ITrackCancel* const pTrackCancel = NULL);
48  virtual wxGISEnumDatasetType GetType(void) const;
49  virtual int GetSubType(void) const;
50  virtual wxULongLong GetSize(void) const { return m_nSize; };
51  virtual wxDateTime GetModificationDate(void) const { return m_dtMod; };
52  virtual void FillMetadata(bool bForce = false);
53  virtual bool IsMetadataFilled() const;
54  //IGxObjectEdit
55  virtual bool CanDelete(void);
56  virtual bool CanRename(void);
57  virtual bool CanCopy(const CPLString &szDestPath);
58  virtual bool CanMove(const CPLString &szDestPath);
59  virtual bool Delete(void);
60  virtual bool Rename(const wxString &sNewName);
61  virtual bool Copy(const CPLString &szDestPath, ITrackCancel* const pTrackCancel);
62  virtual bool Move(const CPLString &szDestPath, ITrackCancel* const pTrackCancel);
63 protected:
64  //wxGxOpenFileGDB
65  virtual void LoadChildren(void);
66  virtual wxGISDataset* const GetDatasetFast(void);
67 protected:
68  wxGISDataset* m_pwxGISDataset;
69  wxULongLong m_nSize;
70  wxDateTime m_dtMod;
71  bool m_bIsMetadataFilled;
72  bool m_bIsChildrenLoaded;
73  long m_nDefaultCreateDirMode;
74 };
75 
83 class WXDLLIMPEXP_GIS_CLT wxGxInitedFeatureDataset :
84  public wxGxFeatureDataset
85 {
86  DECLARE_CLASS(wxGxInitedFeatureDataset)
87 public:
88  wxGxInitedFeatureDataset(wxGISDataset* pwxGISDataset, wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
89  virtual ~wxGxInitedFeatureDataset(void);
90 };
91 
99 class WXDLLIMPEXP_GIS_CLT wxGxInitedTable :
100  public wxGxTable
101 {
102  DECLARE_CLASS(wxGxInitedTable)
103 public:
104  wxGxInitedTable(wxGISDataset* pwxGISDataset, wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
105  virtual ~wxGxInitedTable(void);
106 };
Definition: gxlocaldb.h:99
Definition: gxdataset.h:151
A TrackCancel interface class.
Definition: core.h:144
Definition: gxdataset.h:80
Definition: dataset.h:33
Definition: gxlocaldb.h:33
Definition: gxdataset.h:124
Definition: gxlocaldb.h:83
Definition: gxobject.h:37