GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
#include <ami_stream.h>
Public Member Functions | |
AMI_STREAM () | |
AMI_STREAM (const char *path_name, AMI_stream_type st=AMI_READ_WRITE_STREAM) | |
AMI_err | new_substream (AMI_stream_type st, off_t sub_begin, off_t sub_end, AMI_STREAM< T > **sub_stream) |
~AMI_STREAM (void) | |
AMI_err | read_item (T **elt) |
AMI_err | write_item (const T &elt) |
AMI_err | read_array (T *data, off_t len, off_t *lenp=NULL) |
AMI_err | write_array (const T *data, off_t len) |
off_t | stream_len (void) |
AMI_err | name (char **stream_name) |
const char * | name () const |
AMI_err | seek (off_t offset) |
void | persist (persistence p) |
char * | sprint () |
int | eof () |
Static Public Member Functions | |
static AMI_err | main_memory_usage (size_t *usage, MM_stream_usage usage_type=MM_STREAM_USAGE_OVERHEAD) |
Static Public Member Functions inherited from UntypedStream | |
static unsigned int | get_block_length () |
Protected Attributes | |
T | read_tmp |
Protected Attributes inherited from UntypedStream | |
FILE * | fp |
int | fildes |
AMI_stream_type | access_mode |
char | path [BUFSIZ] |
persistence | per |
unsigned int | substream_level |
off_t | logical_bos |
off_t | logical_eos |
char * | buf |
int | eof_reached |
Definition at line 159 of file ami_stream.h.
AMI_STREAM< T >::AMI_STREAM | ( | ) |
Definition at line 239 of file ami_stream.h.
References UntypedStream::access_mode, AMI_READ_WRITE_STREAM, ami_single_temp_name(), BASE_NAME, UntypedStream::buf, UntypedStream::eof_reached, UntypedStream::fildes, UntypedStream::fp, UntypedStream::logical_bos, UntypedStream::logical_eos, open_stream(), UntypedStream::per, PERSIST_DELETE, STREAM_BUFFER_SIZE, and UntypedStream::substream_level.
AMI_STREAM< T >::AMI_STREAM | ( | const char * | path_name, |
AMI_stream_type | st = AMI_READ_WRITE_STREAM |
||
) |
Definition at line 277 of file ami_stream.h.
References UntypedStream::access_mode, AMI_READ_STREAM, ami_single_temp_name(), BASE_NAME, UntypedStream::buf, UntypedStream::eof_reached, UntypedStream::fildes, UntypedStream::fp, UntypedStream::logical_bos, UntypedStream::logical_eos, NULL, open_stream(), UntypedStream::per, PERSIST_DELETE, PERSIST_PERSISTENT, st, STREAM_BUFFER_SIZE, and UntypedStream::substream_level.
AMI_STREAM< T >::~AMI_STREAM | ( | void | ) |
Definition at line 517 of file ami_stream.h.
References assert, UntypedStream::buf, DEBUG_ASSERT, DEBUG_DELETE, UntypedStream::fp, UntypedStream::per, PERSIST_PERSISTENT, and UntypedStream::substream_level.
int AMI_STREAM< T >::eof | ( | ) |
Definition at line 679 of file ami_stream.h.
References UntypedStream::eof_reached.
|
static |
Definition at line 494 of file ami_stream.h.
AMI_err AMI_STREAM< T >::name | ( | char ** | stream_name | ) |
Definition at line 440 of file ami_stream.h.
References AMI_ERROR_NO_ERROR.
Referenced by ReplacementHeap< T, Compare >::addRun().
const char * AMI_STREAM< T >::name | ( | ) | const |
Definition at line 451 of file ami_stream.h.
References UntypedStream::path.
AMI_err AMI_STREAM< T >::new_substream | ( | AMI_stream_type | st, |
off_t | sub_begin, | ||
off_t | sub_end, | ||
AMI_STREAM< T > ** | sub_stream | ||
) |
Definition at line 325 of file ami_stream.h.
References AMI_ERROR_NO_ERROR, AMI_ERROR_OUT_OF_RANGE, AMI_READ_STREAM, assert, UntypedStream::eof_reached, UntypedStream::logical_bos, UntypedStream::logical_eos, UntypedStream::path, UntypedStream::per, AMI_STREAM< T >::seek(), st, and UntypedStream::substream_level.
void AMI_STREAM< T >::persist | ( | persistence | p | ) |
Definition at line 657 of file ami_stream.h.
References UntypedStream::per.
AMI_err AMI_STREAM< T >::read_array | ( | T * | data, |
off_t | len, | ||
off_t * | lenp = NULL |
||
) |
Definition at line 573 of file ami_stream.h.
AMI_err AMI_STREAM< T >::read_item | ( | T ** | elt | ) |
Definition at line 543 of file ami_stream.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_IO_ERROR, AMI_ERROR_NO_ERROR, assert, UntypedStream::eof_reached, UntypedStream::fp, G_ftell(), and UntypedStream::logical_eos.
Referenced by em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::empty_buff(), em_buffer< T, Key >::insert(), and em_pqueue< T, Key >::merge_buffer().
AMI_err AMI_STREAM< T >::seek | ( | off_t | offset | ) |
Definition at line 460 of file ami_stream.h.
References AMI_ERROR_NO_ERROR, assert, DEBUG_ASSERT, UntypedStream::fp, G_fseek(), UntypedStream::logical_bos, UntypedStream::logical_eos, and UntypedStream::substream_level.
Referenced by em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::empty_buff(), em_buffer< T, Key >::insert(), AMI_STREAM< T >::new_substream(), and em_buffer< T, Key >::sort().
char * AMI_STREAM< T >::sprint | ( | ) |
Definition at line 671 of file ami_stream.h.
off_t AMI_STREAM< T >::stream_len | ( | void | ) |
Definition at line 388 of file ami_stream.h.
References assert, DEBUG_ASSERT, DEBUG_STREAM_LEN, UntypedStream::fp, G_fseek(), and G_ftell().
Referenced by em_pqueue< T, Key >::empty_buff(), em_buffer< T, Key >::insert(), and EMPQueueAdaptive< T, Key >::makeExternal().
AMI_err AMI_STREAM< T >::write_array | ( | const T * | data, |
off_t | len | ||
) |
Definition at line 631 of file ami_stream.h.
AMI_err AMI_STREAM< T >::write_item | ( | const T & | elt | ) |
Definition at line 606 of file ami_stream.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, DEBUG_ASSERT, UntypedStream::fp, G_ftell(), and UntypedStream::logical_eos.
Referenced by em_pqueue< T, Key >::em_pqueue(), EMPQueueAdaptive< T, Key >::makeExternal(), im_buffer< T >::save2str(), and em_buffer< T, Key >::sort().
|
protected |
Definition at line 163 of file ami_stream.h.