diff options
author | Richard <q@1bpm.net> | 2022-09-04 00:32:56 +0100 |
---|---|---|
committer | Richard <q@1bpm.net> | 2022-09-04 00:32:56 +0100 |
commit | 1d055261b4144dbf86b2658437015b15d4dd9bff (patch) | |
tree | 6049b19d1bf953a650383de1a5e438b8b82679f6 /include/jsoncons/ser_context.hpp | |
download | csound-json-1d055261b4144dbf86b2658437015b15d4dd9bff.tar.gz csound-json-1d055261b4144dbf86b2658437015b15d4dd9bff.tar.bz2 csound-json-1d055261b4144dbf86b2658437015b15d4dd9bff.zip |
initial
Diffstat (limited to 'include/jsoncons/ser_context.hpp')
-rw-r--r-- | include/jsoncons/ser_context.hpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/jsoncons/ser_context.hpp b/include/jsoncons/ser_context.hpp new file mode 100644 index 0000000..f5b9d14 --- /dev/null +++ b/include/jsoncons/ser_context.hpp @@ -0,0 +1,57 @@ +/// Copyright 2013-2018 Daniel Parker +// Distributed under the Boost license, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See https://github.com/danielaparker/jsoncons for latest version + +#ifndef JSONCONS_SER_CONTEXT_HPP +#define JSONCONS_SER_CONTEXT_HPP + +namespace jsoncons { + +class ser_context +{ +public: + virtual ~ser_context() noexcept = default; + + virtual size_t line() const + { + return 0; + } + + virtual size_t column() const + { + return 0; + } + + virtual size_t position() const + { + return 0; + } + +#if !defined(JSONCONS_NO_DEPRECATED) + JSONCONS_DEPRECATED_MSG("Instead, use line()") + std::size_t line_number() const + { + return line(); + } + + JSONCONS_DEPRECATED_MSG("Instead, use column()") + std::size_t column_number() const + { + return column(); + } +#endif +}; + +#if !defined(JSONCONS_NO_DEPRECATED) +JSONCONS_DEPRECATED_MSG("Instead, use ser_context") typedef ser_context null_ser_context; + +JSONCONS_DEPRECATED_MSG("Instead, use ser_context") typedef ser_context parsing_context; +JSONCONS_DEPRECATED_MSG("Instead, use ser_context") typedef ser_context serializing_context; +JSONCONS_DEPRECATED_MSG("Instead, use ser_context") typedef ser_context null_parsing_context; +JSONCONS_DEPRECATED_MSG("Instead, use ser_context") typedef ser_context null_serializing_context; +#endif + +} +#endif |