aboutsummaryrefslogtreecommitdiff
path: root/include/proj/io.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/proj/io.hpp')
-rw-r--r--include/proj/io.hpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/proj/io.hpp b/include/proj/io.hpp
index 71a6430d..cfb4b3f7 100644
--- a/include/proj/io.hpp
+++ b/include/proj/io.hpp
@@ -483,12 +483,31 @@ class PROJ_GCC_DLL JSONFormatter {
PROJ_PRIVATE :
//! @cond Doxygen_Suppress
- PROJ_INTERNAL PROJ::CPLJSonStreamingWriter &
+ PROJ_INTERNAL CPLJSonStreamingWriter &
writer() const;
+ struct ObjectContext {
+ JSONFormatter &m_formatter;
+
+ ObjectContext(const ObjectContext &) = delete;
+ ObjectContext(ObjectContext &&) = default;
+
+ explicit ObjectContext(JSONFormatter &formatter, const char *objectType,
+ bool hasId);
+ ~ObjectContext();
+ };
+ PROJ_INTERNAL inline ObjectContext MakeObjectContext(const char *objectType,
+ bool hasId) {
+ return ObjectContext(*this, objectType, hasId);
+ }
+
+ PROJ_INTERNAL void setAllowIDInImmediateChild();
+
// cppcheck-suppress functionStatic
PROJ_INTERNAL bool outputId() const;
+ PROJ_INTERNAL bool outputUsage() const;
+
//! @endcond
protected: