diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-01-09 17:05:21 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-01-09 17:05:21 +0100 |
| commit | d6dad2cee4307f6b190a96dd48942645060919cc (patch) | |
| tree | 5819c2626b6361dd007df884255ab713437939dd /src/proj_internal.h | |
| parent | 5b75e5fdccc531f7b0e3dcd636fa1ff3500bb071 (diff) | |
| download | PROJ-d6dad2cee4307f6b190a96dd48942645060919cc.tar.gz PROJ-d6dad2cee4307f6b190a96dd48942645060919cc.zip | |
Allocate projCtx_t as a C++ object
Diffstat (limited to 'src/proj_internal.h')
| -rw-r--r-- | src/proj_internal.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/proj_internal.h b/src/proj_internal.h index 63e10407..31365bce 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -644,14 +644,22 @@ struct projCppContext; /* proj thread context */ struct projCtx_t { - int last_errno; - int debug_level; - void (*logger)(void *, int, const char *); - void *app_data; - struct projFileAPI_t *fileapi; - struct projCppContext* cpp_context; /* internal context for C++ code */ - int use_proj4_init_rules; /* -1 = unknown, 0 = no, 1 = yes */ - int epsg_file_exists; /* -1 = unknown, 0 = no, 1 = yes */ + int last_errno = 0; + int debug_level = 0; + void (*logger)(void *, int, const char *) = nullptr; + void *logger_app_data = nullptr; + struct projFileAPI_t *fileapi = nullptr; + struct projCppContext* cpp_context = nullptr; /* internal context for C++ code */ + int use_proj4_init_rules = -1; /* -1 = unknown, 0 = no, 1 = yes */ + int epsg_file_exists = -1; /* -1 = unknown, 0 = no, 1 = yes */ + + projCtx_t() = default; + projCtx_t(const projCtx_t&); + ~projCtx_t(); + + projCtx_t& operator= (const projCtx_t&) = delete; + + static projCtx_t createDefault(); }; /* Generate pj_list external or make list from include file */ |
