10 #ifndef __CIRCULARBUFFER_H_
11 #define __CIRCULARBUFFER_H_
62 int32_t
push(FILE* source, int32_t source_size);
96 return m_bytes_available;
102 return m_bytes_count;
109 virtual const char*
get_name()
const {
return "CircularBuffer"; }
116 int32_t append_chunk(
const char* source, int32_t source_size,
117 bool from_buffer_begin);
120 int32_t append_chunk(FILE* source, int32_t source_size,
121 bool from_buffer_begin);
124 void detach_chunk(
char** dest, int32_t* dest_size, int32_t dest_offset, int32_t num_bytes,
125 bool from_buffer_begin);
130 bool has_next_locally(
char* begin,
char* end);
135 index_t next_token_idx_locally(
index_t &start,
char* begin,
char* end);
138 void move_pointer(
char** pointer,
char* new_position);
160 int32_t m_bytes_available;
163 int32_t m_bytes_count;