Lines Matching refs:buffer

14 // Internal buffer sizes (default and "unbuffered" versions)
23 buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true)
32 // Sync output buffer and close only if responsible for file
37 // Make sure internal buffer is deallocated
70 // On success, allocate internal buffer and set flags
98 // On success, allocate internal buffer and set flags
122 // Destroy internal buffer if it exists
167 // Determine number of characters in internal get buffer
195 // Attempt to fill internal buffer from gzipped file
196 // (buffer must be guaranteed to exist...)
197 int bytes_read = gzread(file, buffer, buffer_size);
202 this->setg(buffer, buffer, buffer);
206 this->setg(buffer, buffer, buffer + bytes_read);
222 // Add extra character to buffer if not EOF
249 // Impromptu char buffer (allows "unbuffered" output)
264 // Assign new buffer
274 // least a buffer of size 1 (very inefficient though, therefore make it bigger?)
278 // Replace existing buffer (if any) with small internal buffer
280 buffer = NULL;
287 // Replace existing buffer (if any) with external buffer
289 buffer = p;
306 // Allocate internal buffer
310 // If internal buffer required, allocate one
311 if (own_buffer && !buffer)
316 // Allocate internal buffer
317 buffer = new char_type[buffer_size];
319 this->setg(buffer, buffer, buffer);
320 // Setup entire internal buffer as put area.
321 // The one-past-end pointer actually points to the last element of the buffer,
323 // These pointers remain in place for the duration of the buffer
324 this->setp(buffer, buffer + buffer_size - 1);
328 // Even in "unbuffered" case, (small?) get buffer is still required
330 buffer = new char_type[buffer_size];
331 this->setg(buffer, buffer, buffer);
332 // "Unbuffered" means no put buffer
338 // If buffer already allocated, reset buffer pointers just to make sure no
340 this->setg(buffer, buffer, buffer);
341 this->setp(buffer, buffer + buffer_size - 1);
345 // Destroy internal buffer
349 // If internal buffer exists, deallocate it
350 if (own_buffer && buffer)
355 delete[] buffer;
356 buffer = NULL;
362 // Reset buffer pointers to initial state if external buffer exists
363 this->setg(buffer, buffer, buffer);
364 if (buffer)
365 this->setp(buffer, buffer + buffer_size - 1);
373 // Default constructor initializes stream buffer
378 // Initialize stream buffer and open file
387 // Initialize stream buffer and attach to file
428 // Default constructor initializes stream buffer
433 // Initialize stream buffer and open file
442 // Initialize stream buffer and attach to file