OpenIndy-Core  0.2.0.43
exchangesimpleascii.h
Go to the documentation of this file.
1 #ifndef EXCHANGESIMPLEASCII_H
2 #define EXCHANGESIMPLEASCII_H
3 
4 #include <QVariantList>
5 
6 #include "exchangeinterface.h"
7 
8 namespace oi{
9 
16 {
17  Q_OBJECT
18 
19 public:
20  explicit ExchangeSimpleAscii(QObject *parent = 0);
21 
22  virtual ~ExchangeSimpleAscii();
23 
24  //###############################################
25  //all possible column types (geometry attributes)
26  //###############################################
27 
28  enum ColumnType{
52  eColumnLength
53  };
54 
55  //#########################################
56  //methods to get or set further information
57  //#########################################
58 
59  virtual QList<ExchangeSimpleAscii::ColumnType> getDefaultColumnOrder(const GeometryTypes &typeOfGeometry) const;
60  virtual QMap<ExchangeSimpleAscii::ColumnType, QVariantList> getFilePreview(const GeometryTypes &typeOfGeometry) const;
61  virtual QList<ExchangeSimpleAscii::ColumnType> getPossibleColumns(const GeometryTypes &typeOfGeometry) const;
62 
63  const QStringList &getSupportedDelimiters() const;
64 
65  const QList<ExchangeSimpleAscii::ColumnType> &getUserDefinedColumns() const;
66  void setUserDefinedColumns(const QList<ExchangeSimpleAscii::ColumnType> &userDefinedColumns);
67 
68  const GeometryTypes &getTypeOfGeometry() const;
69  void setGeometryType(const GeometryTypes &typeOfGeometry);
70 
71  const bool &getSkipFirstLine() const;
72  void setSkipFirstLine(const bool &skipFirstLine);
73 
74  const QString &getUsedDelimiter() const;
75  void setDelimiter(const QString &usedDelimiter);
76 
77 protected:
78 
79  //###########################
80  //input and output parameters
81  //###########################
82 
83  QList<ExchangeSimpleAscii::ColumnType> userDefinedColumns; //an ordered list of enum values that specify what to do with each column
84  GeometryTypes typeOfGeometry; //specifies which type of geometry shall be im- or exported
85  bool skipFirstLine; //Skip the first line in a file during import / do not write headers to file during export
86  QString usedDelimiter; //the delimiter that shall be used when parsing the file
87 
88  QStringList supportedDelimiters;
89 
90 };
91 
92 }
93 
94 #ifndef STR
95 #define STR(x) #x
96 #endif
97 #ifndef STR2
98 #define STR2(x) STR(x)
99 #endif
100 
101 #ifndef CONCAT
102 #define CONCAT(a, b) a ## b
103 #endif
104 #ifndef CONCAT2
105 #define CONCAT2(a, b) CONCAT(a, b)
106 #endif
107 
108 #define EXCHANGE_SIMPLEASCII_PREFIX de.openIndy.plugin.exchange.exchangeSimpleAscii.v
109 #define ExchangeSimpleAscii_iidd STR2(CONCAT2(EXCHANGE_SIMPLEASCII_PREFIX, PLUGIN_INTERFACE_VERSION))
110 
111 #endif // EXCHANGESIMPLEASCII_H
Definition: exchangesimpleascii.h:46
Definition: exchangesimpleascii.h:38
Definition: exchangesimpleascii.h:43
QString usedDelimiter
Definition: exchangesimpleascii.h:86
GeometryTypes
all OpenIndy geometry types
Definition: types.h:128
Definition: exchangesimpleascii.h:36
Definition: exchangesimpleascii.h:34
Definition: exchangesimpleascii.h:40
GeometryTypes typeOfGeometry
Definition: exchangesimpleascii.h:84
Definition: exchangesimpleascii.h:41
Definition: coordinatesystem.h:15
The ExchangeSimpleAscii class Interface that shall be used for simple not standardized ascii files...
Definition: exchangesimpleascii.h:15
Definition: exchangesimpleascii.h:32
The OiExchangeInterface class Base class for implementing import/export plugins.
Definition: exchangeinterface.h:19
Definition: exchangesimpleascii.h:37
Definition: exchangesimpleascii.h:35
Definition: exchangesimpleascii.h:49
Definition: exchangesimpleascii.h:39
QList< ExchangeSimpleAscii::ColumnType > userDefinedColumns
Definition: exchangesimpleascii.h:83
Definition: exchangesimpleascii.h:29
bool skipFirstLine
Definition: exchangesimpleascii.h:85
QStringList supportedDelimiters
Definition: exchangesimpleascii.h:88
Definition: exchangesimpleascii.h:30
Definition: exchangesimpleascii.h:50
Definition: exchangesimpleascii.h:51
ColumnType
Definition: exchangesimpleascii.h:28
Definition: exchangesimpleascii.h:42
Definition: exchangesimpleascii.h:31
Definition: exchangesimpleascii.h:47
Definition: exchangesimpleascii.h:44
Definition: exchangesimpleascii.h:45
#define OI_CORE_EXPORT
Definition: types.h:11
Definition: exchangesimpleascii.h:48
Definition: exchangesimpleascii.h:33