Ilwis-Objects  1.0
GIS and Remote Sensing framework for data access and processing
 All Classes Functions Enumerations Pages
catalog.h
1 #ifndef CATALOG_H
2 #define CATALOG_H
3 
4 #include <QObject>
5 #include <QVector>
6 #include <QUrl>
7 #include <QSharedPointer>
8 #include <QFileInfo>
9 #include "Kernel_global.h"
10 #include "kernel.h"
11 #include "ilwisdata.h"
12 
13 
14 
15 
16 
17 namespace Ilwis {
18 
19 class CatalogConnector;
20 class CatalogFactory;
21 
22 
28 class KERNELSHARED_EXPORT Catalog : public IlwisObject
29 {
30  Q_OBJECT
31 
32 public:
33  friend class CatalogConnector;
34 
38  explicit Catalog();
43  Catalog(const Resource& resource);
44  ~Catalog();
54  std::vector<Resource> items() const;
62  virtual bool prepare();
71  bool isValid() const ;
77  IlwisTypes ilwisType() const;
83  virtual QString resolve(const QString& name, IlwisTypes tp=itUNKNOWN) const;
92  QUrl parentCatalog() const;
98  void setParentCatalog(const QUrl& url);
108  QUrl filesystemLocation() const;
109 
110  IlwisObject *clone();
111 
112 
113 protected:
114 
115 private:
116  void addItemsPrivate(const std::vector<Resource>& itemlist, bool doclear=false); // ignores readonly flag; only used internally
117  bool fillCatalog();
118  void copyTo(IlwisObject *obj);
119 
120  QUrl _parent;
121  std::vector<Resource> _items;
122 
123 
124 signals:
125 
126 public slots:
127 
128 };
130 }
131 
132 
133 
134 Q_DECLARE_METATYPE(Ilwis::ICatalog)
135 
136 #endif // CATALOG_H