QGIS API Documentation  3.8.0-Zanzibar (11aff65)
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
7  email : matthias@opengis.ch
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 <QSharedData>
33 #include "qgsfields.h"
34 
35 /***************************************************************************
36  * This class is considered CRITICAL and any change MUST be accompanied with
37  * full unit tests in testqgsfields.cpp.
38  * See details in QEP #17
39  ****************************************************************************/
40 
41 class QgsFieldsPrivate : public QSharedData
42 {
43  public:
44 
45  QgsFieldsPrivate()
46  {
47  }
48 
49  QgsFieldsPrivate( const QgsFieldsPrivate &other )
50  : QSharedData( other )
51  , fields( other.fields )
52  , nameToIndex( other.nameToIndex )
53  {
54  }
55 
56  ~QgsFieldsPrivate() {}
57 
59  QVector<QgsFields::Field> fields;
60 
62  QHash<QString, int> nameToIndex;
63 
64 };
65 
67 
68 #endif // QGSFIELDS_P_H