1 #ifndef _C4_YML_WRITER_HPP_
2 #define _C4_YML_WRITER_HPP_
4 #ifndef _C4_YML_COMMON_HPP_
48 (void)fwrite(a,
sizeof(
char), N - 1,
m_file);
54 C4_SUPPRESS_WARNING_GCC_CLANG_WITH_PUSH(
"-Wsign-conversion")
57 (void)fwrite(sp.str,
sizeof(csubstr::char_type), sp.len,
m_file);
59 C4_SUPPRESS_WARNING_GCC_CLANG_POP
70 for(
size_t i = 0; i < num_times; ++i)
81 template<
class OStream>
106 C4_SUPPRESS_WARNING_GCC_CLANG_WITH_PUSH(
"-Wsign-conversion")
111 C4_SUPPRESS_WARNING_GCC_CLANG_POP
122 for(
size_t i = 0; i < num_times; ++i)
140 substr
_get(
bool error_on_excess)
const
144 else if(error_on_excess)
155 RYML_ASSERT( !
m_buf.overlaps(a));
165 RYML_ASSERT( ! sp.overlaps(
m_buf));
181 for(
size_t i = 0; i < num_times; ++i)
Common utilities and infrastructure used by ryml.
void _do_write(csubstr sp)
WriterOStream(OStream &s)
void _do_write(const char(&a)[N])
void _do_write(const char c)
WriterFile(FILE *f=nullptr)
substr _get(bool error_on_excess) const
void _do_write(csubstr sp)
void _do_write(const char c, size_t num_times)
void _do_write(const char c, size_t num_times)
void _do_write(const char(&a)[N])
void _do_write(const char c)
void _do_write(const char(&a)[N])
void _do_write(csubstr sp)
void _do_write(const char c, size_t num_times)
void _do_write(const char c)
void error(Callbacks const &cb, const char *msg, size_t msg_len, Location loc)
A writer that outputs to a file.
A writer that outputs to an STL-like ostream.