10 #ifndef __CIRCULARBUFFER_H_
11 #define __CIRCULARBUFFER_H_
65 int32_t
push(FILE* source, int32_t source_size);
99 return m_bytes_available;
105 return m_bytes_count;
112 virtual const char*
get_name()
const {
return "CircularBuffer"; }
119 int32_t append_chunk(
const char* source, int32_t source_size,
120 bool from_buffer_begin);
123 int32_t append_chunk(FILE* source, int32_t source_size,
124 bool from_buffer_begin);
127 void detach_chunk(
char** dest, int32_t* dest_size, int32_t dest_offset, int32_t num_bytes,
128 bool from_buffer_begin);
133 bool has_next_locally(
char* begin,
char* end);
138 index_t next_token_idx_locally(
index_t &start,
char* begin,
char* end);
141 void move_pointer(
char** pointer,
char* new_position);
163 int32_t m_bytes_available;
166 int32_t m_bytes_count;
Implementation of circular buffer This buffer has logical structure such as queue (FIFO)...
int32_t push(SGVector< char > source)
int32_t num_bytes_contained() const
void skip_characters(int32_t num_chars)
index_t next_token_idx(index_t &start)
Class SGObject is the base class of all shogun objects.
The class CTokenizer acts as a base class in order to implement tokenizers. Sub-classes must implemen...
SGVector< char > pop(int32_t num_chars)
all of classes and functions are contained in the shogun namespace
void set_tokenizer(CTokenizer *tokenizer)
int32_t available() const
virtual const char * get_name() const