diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-12-26 10:53:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-26 10:53:01 +0100 |
| commit | 81ec8c0b58d66333fccd3703dab62a11132a0331 (patch) | |
| tree | 41b4675d169f849516649700ab4f50d4cffa4c02 /src/list.cpp | |
| parent | 355d681ed88019e97742344bd642c2fd97e700a1 (diff) | |
| parent | 80dad6ef2bed4a83008db06986dc168918d48476 (diff) | |
| download | PROJ-81ec8c0b58d66333fccd3703dab62a11132a0331.tar.gz PROJ-81ec8c0b58d66333fccd3703dab62a11132a0331.zip | |
Merge pull request #1203 from rouault/cpp_conversion
Conversion of most C files to C++
Diffstat (limited to 'src/list.cpp')
| -rw-r--r-- | src/list.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/list.cpp b/src/list.cpp new file mode 100644 index 00000000..73ca5f86 --- /dev/null +++ b/src/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" + {nullptr, nullptr, nullptr}, +}; +#undef PROJ_HEAD + + +const PJ_OPERATIONS *proj_list_operations(void) { + return pj_list; +} |
