Ilwis-Objects  1.0
GIS and Remote Sensing framework for data access and processing
 All Classes Functions Enumerations Pages
identifieritem.h
1 #ifndef IDENTIFIERITEM_H
2 #define IDENTIFIERITEM_H
3 
4 #include "Kernel_global.h"
5 
6 namespace Ilwis{
7 
8 class NamedIdentifierRange;
12 class KERNELSHARED_EXPORT IndexedIdentifier : public DomainItem
13 {
14 public:
15 
16  friend class IndexedIdentifierRange;
17 
22 
30  IndexedIdentifier(const QString& label, quint32 ind=0, qint32 cnt =iUNDEF);
31 
38  QString name() const;
39 
45  quint32 raw() const;
46 
47  //void setIndex(quint32 ind);
48 
54  QString prefix() const;
55 
61  void setPrefix(const QString& pf);
62 
71  bool operator==(const IndexedIdentifier& item) const;
72 
78  DomainItem *clone() const;
79 
80  //@override
81  IlwisTypes valueType() const;
82 
88  bool isValid() const;
89 
94  static ItemRange *createRange();
95 
96  //@override
97  static IlwisTypes valueTypeS();
98 
99 private:
100  QString _prefix;
101  quint32 _count;
102 
103 };
104 
105 class KERNELSHARED_EXPORT NamedIdentifier : public DomainItem {
106 public:
107 
108  friend class NamedIdentifierRange;
109 
113  NamedIdentifier();
114 
120  NamedIdentifier(const QString& name, quint32 rawvalue=iUNDEF);
121 
127  bool isValid() const;
128 
134  QString name() const;
135 
141  void setName(const QString& n);
142 
151  bool operator==(const NamedIdentifier& item) const;
152 
158  IlwisTypes valueType() const;
159 
165  DomainItem *clone() const;
166 
171  static Ilwis::NamedIdentifierRange *createRange();
172 
178  static IlwisTypes valueTypeS();
179 
180 private:
181  QString _name;
182 };
183 
184 typedef QSharedPointer<NamedIdentifier> SPNamedIdentifier;
185 typedef QSharedPointer<IndexedIdentifier> SPIndexedIdentifier;
186 }
187 
188 #endif // IDENTIFIERITEM_H