QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
Loading...
Searching...
No Matches
qgsfields_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsfields_p - %{Cpp:License:ClassName}
3
4 ---------------------
5 begin : 22.9.2016
6 copyright : (C) 2016 by Matthias Kuhn
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSFIELDS_P_H
17#define QGSFIELDS_P_H
18
19
21
22//
23// W A R N I N G
24// -------------
25//
26// This file is not part of the QGIS API. It exists purely as an
27// implementation detail. This header file may change from version to
28// version without notice, or even be removed.
29//
30
31#include "qgis_core.h"
32#include "qgsfields.h"
33
34#include <QSharedData>
35
36/***************************************************************************
37 * This class is considered CRITICAL and any change MUST be accompanied with
38 * full unit tests in testqgsfields.cpp.
39 * See details in QEP #17
40 ****************************************************************************/
41
42class QgsFieldsPrivate : public QSharedData
43{
44 public:
45 QgsFieldsPrivate() {}
46
47 QgsFieldsPrivate( const QgsFieldsPrivate &other )
48 : QSharedData( other )
49 , fields( other.fields )
50 , nameToIndex( other.nameToIndex )
51 {}
52
53 ~QgsFieldsPrivate() {}
54
56 QVector<QgsFields::Field> fields;
57
59 QHash<QString, int> nameToIndex;
60
61 private:
62 QgsFieldsPrivate &operator=( const QgsFieldsPrivate & ) = delete;
63};
64
66
67#endif // QGSFIELDS_P_H