aboutsummaryrefslogtreecommitdiff
path: root/src/pj_list.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-12-18 20:24:11 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-12-26 10:08:53 +0100
commit610957f7035242f15743c399ffd429b92bc36206 (patch)
tree73f0d51147e2f4860c4bfc875f7a4bf9359386d4 /src/pj_list.cpp
parent355d681ed88019e97742344bd642c2fd97e700a1 (diff)
downloadPROJ-610957f7035242f15743c399ffd429b92bc36206.tar.gz
PROJ-610957f7035242f15743c399ffd429b92bc36206.zip
cpp conversion: minimal steps to fix compilation errors, not warnings
Diffstat (limited to 'src/pj_list.cpp')
-rw-r--r--src/pj_list.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/pj_list.cpp b/src/pj_list.cpp
new file mode 100644
index 00000000..55ea36c2
--- /dev/null
+++ b/src/pj_list.cpp
@@ -0,0 +1,32 @@
+/* Projection System: default list of projections
+** Use local definition of PJ_LIST_H for subset.
+*/
+
+#include "proj.h"
+
+#define USE_PJ_LIST_H 1
+#include "projects.h"
+
+
+/* Generate prototypes for projection functions */
+#define PROJ_HEAD(id, name) extern "C" struct PJconsts *pj_##id(struct PJconsts*);
+#include "pj_list.h"
+#undef PROJ_HEAD
+
+/* Generate extern declarations for description strings */
+#define PROJ_HEAD(id, name) extern "C" const char * const pj_s_##id;
+#include "pj_list.h"
+#undef PROJ_HEAD
+
+/* Generate the null-terminated list of projection functions with associated mnemonics and descriptions */
+#define PROJ_HEAD(id, name) {#id, pj_##id, &pj_s_##id},
+const struct PJ_LIST pj_list[] = {
+#include "pj_list.h"
+ {0, 0, 0},
+};
+#undef PROJ_HEAD
+
+
+const PJ_OPERATIONS *proj_list_operations(void) {
+ return pj_list;
+}