GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
#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 153 of file ami_stream.h.
AMI_STREAM< T >::AMI_STREAM |
Definition at line 227 of file ami_stream.h.
References AMI_READ_WRITE_STREAM, ami_single_temp_name(), BASE_NAME, open_stream(), PERSIST_DELETE, and STREAM_BUFFER_SIZE.
AMI_STREAM< T >::AMI_STREAM | ( | const char * | path_name, |
AMI_stream_type | st = AMI_READ_WRITE_STREAM |
||
) |
Definition at line 264 of file ami_stream.h.
References AMI_READ_STREAM, ami_single_temp_name(), BASE_NAME, NULL, open_stream(), PERSIST_DELETE, PERSIST_PERSISTENT, st, strcpy, and STREAM_BUFFER_SIZE.
AMI_STREAM< T >::~AMI_STREAM | ( | void | ) |
Definition at line 500 of file ami_stream.h.
References assert, DEBUG_ASSERT, DEBUG_DELETE, and PERSIST_PERSISTENT.
int AMI_STREAM< T >::eof |
Definition at line 662 of file ami_stream.h.
|
static |
Definition at line 477 of file ami_stream.h.
const char * AMI_STREAM< T >::name |
Definition at line 437 of file ami_stream.h.
AMI_err AMI_STREAM< T >::name | ( | char ** | stream_name | ) |
Definition at line 426 of file ami_stream.h.
References AMI_ERROR_NO_ERROR, and strcpy.
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 313 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::per, AMI_STREAM< T >::seek(), st, and UntypedStream::substream_level.
void AMI_STREAM< T >::persist | ( | persistence | p | ) |
Definition at line 639 of file ami_stream.h.
AMI_err AMI_STREAM< T >::read_array | ( | T * | data, |
off_t | len, | ||
off_t * | lenp = NULL |
||
) |
Definition at line 554 of file ami_stream.h.
AMI_err AMI_STREAM< T >::read_item | ( | T ** | elt | ) |
Definition at line 525 of file ami_stream.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_IO_ERROR, AMI_ERROR_NO_ERROR, assert, and G_ftell().
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 445 of file ami_stream.h.
References AMI_ERROR_NO_ERROR, assert, DEBUG_ASSERT, and G_fseek().
Referenced by em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::empty_buff(), em_buffer< T, Key >::insert(), and AMI_STREAM< T >::new_substream().
char * AMI_STREAM< T >::sprint |
Definition at line 652 of file ami_stream.h.
off_t AMI_STREAM< T >::stream_len | ( | void | ) |
Definition at line 375 of file ami_stream.h.
References assert, DEBUG_ASSERT, DEBUG_STREAM_LEN, G_fseek(), and G_ftell().
Referenced by em_pqueue< T, Key >::empty_buff(), and EMPQueueAdaptive< T, Key >::makeExternal().
AMI_err AMI_STREAM< T >::write_array | ( | const T * | data, |
off_t | len | ||
) |
Definition at line 613 of file ami_stream.h.
AMI_err AMI_STREAM< T >::write_item | ( | const T & | elt | ) |
Definition at line 588 of file ami_stream.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, DEBUG_ASSERT, and G_ftell().
Referenced by em_pqueue< T, Key >::em_pqueue(), EMPQueueAdaptive< T, Key >::makeExternal(), and im_buffer< T >::save2str().
|
protected |
Definition at line 156 of file ami_stream.h.