Files
bluelib/core/include/blue/core/stringstream.h

50 lines
1.6 KiB
C

#ifndef BLUE_CORE_STRINGSTREAM_H_
#define BLUE_CORE_STRINGSTREAM_H_
#include <blue/core/macros.h>
#include <blue/core/misc.h>
#include <blue/core/status.h>
#include <blue/core/stream.h>
#include <stddef.h>
B_DECLS_BEGIN;
#define B_TYPE_STRINGSTREAM (b_stringstream_get_type())
B_DECLARE_TYPE(b_stringstream);
B_TYPE_CLASS_DECLARATION_BEGIN(b_stringstream)
B_TYPE_CLASS_DECLARATION_END(b_stringstream)
BLUE_API b_type b_stringstream_get_type(void);
BLUE_API b_stringstream *b_stringstream_create(void);
BLUE_API b_stringstream *b_stringstream_create_with_buffer(char *buf, size_t max);
BLUE_API b_status b_stringstream_reset(b_stringstream *strv);
BLUE_API b_status b_stringstream_reset_with_buffer(
b_stringstream *strv, char *buf, size_t max);
BLUE_API const char *b_stringstream_ptr(const b_stringstream *strv);
BLUE_API char *b_stringstream_steal(b_stringstream *strv);
BLUE_API size_t b_stringstream_get_length(const b_stringstream *strv);
#if 0
BLUE_API void b_stringstream_push_indent(b_stringstream *strv, int indent);
BLUE_API void b_stringstream_pop_indent(b_stringstream *strv);
BLUE_API b_status b_stringstream_add(b_stringstream *strv, const char *str);
BLUE_API b_status b_stringstream_addf(b_stringstream *strv, const char *format, ...);
BLUE_API b_status b_stringstream_addv(b_stringstream *strv, const char **strs);
BLUE_API b_status b_stringstream_addvf(
b_stringstream *strv, const char *format, va_list arg);
BLUE_API b_status b_stringstream_addvl(
b_stringstream *strv, const char **strs, size_t count);
BLUE_API b_status b_stringstream_add_many(b_stringstream *strv, ...);
#endif
B_DECLS_END;
#endif