4 #ifndef BUFFEREDFILEREADER_H
16 #ifndef INPUT_FORMAT_H
43 const char *
line()
const {
return curr; }
48 strcpy(linebuf, new_line);
51 bool failed()
const {
return failure; }
52 bool ok()
const {
return !failure; }
59 while (
line() && match_condition(
line()))
72 virtual bool failed()
const = 0;
91 #if defined(ASSERTION_USED)
92 #define ENFORCE_CHECKED_WRITTEN
99 virtual bool ok()
const = 0;
100 virtual void out(
char ch) = 0;
101 virtual const char *
name()
const = 0;
104 virtual
int out(const
char *text) {
116 #ifdef GCC_TOO_SMART_FOR_USEFUL_FINAL_TYPE_SUGGESTION
117 # pragma GCC diagnostic push
118 # pragma GCC diagnostic ignored "-Wsuggest-final-types"
126 #if defined(ENFORCE_CHECKED_WRITTEN)
127 bool checked_written;
156 #ifdef GCC_TOO_SMART_FOR_USEFUL_FINAL_TYPE_SUGGESTION
157 # pragma GCC diagnostic pop
161 #error reader.h included twice
int out(const char *text) OVERRIDE
FileWriter(const char *outf)
virtual bool ok() const =0
AliDataPtr format(AliDataPtr data, const size_t wanted_len, GB_ERROR &error)
void out(char ch) FINAL_OVERRIDE
PREPARE_MARK_NONFINAL_CLASS(FileWriter)
void repeated(char ch, int repeat)
const char * shorttimekeep(char *heapcopy)
PREPARE_MARK_NONFINAL_CLASS(Reader)
MARK_NONFINAL_CLASS(FileWriter)
MARK_NONFINAL_DTOR(Reader)
const char * name() const OVERRIDE
#define __ATTR__FORMAT_MEMBER(pos)
virtual void out(char ch)=0
SmartPtr< FormatReader > FormatReaderPtr
virtual int outf(const char *format,...) __ATTR__FORMAT_MEMBER(1)
#define RETURN_LOCAL_ALLOC(mallocation)
virtual void throw_write_error() const __ATTR__NORETURN
void ignore_rest_of_file()
static const Convaln_exception * exception_thrown()
#define __ATTR__USERESULT
virtual const char * name() const =0
const char * shorttimecopy(const char *nocopy)
const char * line() const
int outf(const char *format,...) OVERRIDE __ATTR__FORMAT_MEMBER(1)
void set_line(const char *new_line)
void skipOverLinesThat(const PRED &match_condition)