4 #ifndef FIRE_DATA_FIELD_HPP_INCLUDED
5 #define FIRE_DATA_FIELD_HPP_INCLUDED
7 #include <QtCore/QString>
8 #include <QtCore/QVariant>
9 #include <boost/shared_ptr.hpp>
10 #include <boost/thread/mutex.hpp>
11 #include <fire/gear/threading/types.hpp>
16 #include "fire/gis/export.hpp"
17 #include "fire/source/vector/FieldType.hpp"
45 typedef std::map< ExtraParamFieldType, int > MapExtraParam;
47 static std::string qString2stdString(QString
const & qs);
48 static QString stdString2qString(std::string
const & str);
49 static FieldType::FieldType qType2fType(QVariant::Type
const & t);
50 static QVariant::Type fType2qType(FieldType::FieldType
const & t);
74 Field(std::string
const & name,
75 const FieldType::FieldType &type,
76 bool const & nullable,
77 bool const & iskeypart,
78 int const & nativeType);
85 bool operator!=(
Field const & r)
const;
92 bool operator==(
Field const & r)
const;
99 bool isEqualsStricted(
Field const & r)
const;
105 std::string getName()
const;
111 FieldType::FieldType getType()
const;
117 int getNativeType()
const;
123 bool isNullable()
const;
129 bool isKeyPart()
const;
135 void setName(std::string
const & name);
141 void setType(FieldType::FieldType
const & ft);
147 void setNullable(
bool const & nullable);
153 void setKeyPart(
bool const & keypart);
160 void addExtraParam(
const ExtraParamFieldType
id,
const int& val);
169 const int getExtraParam(
const ExtraParamFieldType
id)
const;
176 bool existsExtraParam(
const ExtraParamFieldType
id)
const;
182 FieldType::FieldType _type;
186 std::string _default;
187 MapExtraParam _extraParam;
189 mutable boost::mutex _mtx;
Definition: FieldSh.hpp:21
ExtraParamFieldType
Chiavi dei parametri descrittivi extra impostabili sul Field.
Definition: Field.hpp:35