|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
|
#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 UntypedStream::access_mode, AMI_READ_WRITE_STREAM, ami_single_temp_name(), AMI_STREAM< T >::AMI_STREAM(), BASE_NAME, UntypedStream::buf, UntypedStream::eof_reached, UntypedStream::fildes, UntypedStream::fp, UntypedStream::logical_bos, UntypedStream::logical_eos, open_stream(), UntypedStream::per, PERSIST_DELETE, AMI_STREAM< T >::seek(), STREAM_BUFFER_SIZE, and UntypedStream::substream_level.
Referenced by ReplacementHeap< T, Compare >::addRun(), ReplacementHeapBlock< T, Compare >::addRun(), AMI_STREAM< T >::AMI_STREAM(), AMI_STREAM< T >::AMI_STREAM(), clean_dir(), em_buffer< T, Key >::cleanup(), datetime_get_local_time(), datetime_get_local_timezone(), db_isdir(), BasicMinMaxHeap< T >::destructiveVerify(), DGL_SPAN_DEPTHFIRST_SPANNING_FUNC(), DGL_SPAN_MINIMUM_SPANNING_FUNC(), dig_file_load(), em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::em_pqueue(), EMPQueueAdaptive< T, Key >::EMPQueueAdaptive(), EMPQueueAdaptive< T, Key >::EMPQueueAdaptive(), em_pqueue< T, Key >::empty_buff(), em_pqueue< T, Key >::empty_buff_0(), em_pqueue< T, Key >::extract_all_min(), BasicMinMaxHeap< T >::extract_all_min(), pqheap_t1< T >::extract_all_min(), ReplacementHeap< T, Compare >::extract_min(), ReplacementHeapBlock< T, Compare >::extract_min(), em_pqueue< T, Key >::extract_min(), pqheap_t1< T >::extract_min(), em_pqueue< T, Key >::fillpq(), find_process(), free_datum_list(), free_ellps_list(), G__machine_name(), G_date(), G_define_flag(), G_define_option(), G_get_available_mapsets(), G_is_mapset_in_search_path(), G_ls_format(), G_mapset_permissions2(), G_owner(), G_rc_path(), G_recursive_copy(), G_recursive_remove(), G_srand48_auto(), G_whoami(), em_buffer< T, Key >::get_stream(), GPJ_get_datum_by_name(), GPJ_get_ellipsoid_by_name(), GPJ_osr_to_grass(), GPJ_wkt_to_grass(), ReplacementHeap< T, Compare >::heapify(), ReplacementHeapBlock< T, Compare >::heapify(), I_list_subgroup(), ReplacementHeap< T, Compare >::init(), ReplacementHeapBlock< T, Compare >::init(), em_buffer< T, Key >::insert(), em_pqueue< T, Key >::insert(), pqheap_t1< T >::insert(), em_buffer< T, Key >::insert(), EMPQueueAdaptive< T, Key >::is_full(), list_subgroups(), main(), AMI_STREAM< T >::main_memory_usage(), EMPQueueAdaptive< T, Key >::makeExternal(), EMPQueueAdaptive< T, Key >::makeExternalDebug(), EMPQueueAdaptive< T, Key >::maxlen(), em_pqueue< T, Key >::maxlen(), MEM_STREAM< T >::MEM_STREAM(), em_pqueue< T, Key >::merge_buffer(), em_pqueue< T, Key >::merge_bufs2pq(), em_pqueue< T, Key >::merge_streams(), pqheap_t1< T >::min(), em_pqueue< T, Key >::min(), AMI_STREAM< T >::name(), MEM_STREAM< T >::name(), AMI_STREAM< T >::new_substream(), post_exec(), pqheap_t1< T >::pqheap_t1(), pre_exec(), em_buffer< T, Key >::print(), em_buffer< T, Key >::print_range(), AMI_STREAM< T >::read_array(), read_datum_table(), read_ellipsoid_table(), AMI_STREAM< T >::read_item(), ReplacementHeap< T, Compare >::ReplacementHeap(), im_buffer< T >::reset(), im_buffer< T >::save2str(), AMI_STREAM< T >::seek(), im_buffer< T >::shift_left(), em_buffer< T, Key >::sort(), im_buffer< T >::sort(), AMI_STREAM< T >::sprint(), MEM_STREAM< T >::sprint(), AMI_STREAM< T >::stream_len(), Vect_coor_info(), Vect_maptype_info(), AMI_STREAM< T >::write_array(), AMI_STREAM< T >::write_item(), AMI_STREAM< T >::~AMI_STREAM(), and pqheap_t1< T >::~pqheap_t1().
| 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 UntypedStream::access_mode, AMI_READ_STREAM, ami_single_temp_name(), AMI_STREAM< T >::AMI_STREAM(), 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, AMI_STREAM< T >::seek(), st, strcpy, STREAM_BUFFER_SIZE, and UntypedStream::substream_level.
| AMI_STREAM< T >::~AMI_STREAM | ( | void | ) |
Definition at line 500 of file ami_stream.h.
References AMI_STREAM< T >::AMI_STREAM(), assert, UntypedStream::buf, DEBUG_ASSERT, DEBUG_DELETE, UntypedStream::fp, UntypedStream::per, PERSIST_PERSISTENT, UntypedStream::substream_level, and unlink.
| int AMI_STREAM< T >::eof | ( | ) |
Definition at line 662 of file ami_stream.h.
References UntypedStream::eof_reached.
|
static |
Definition at line 477 of file ami_stream.h.
References AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), MM_STREAM_USAGE_BUFFER, MM_STREAM_USAGE_CURRENT, MM_STREAM_USAGE_MAXIMUM, MM_STREAM_USAGE_OVERHEAD, and STREAM_BUFFER_SIZE.
Referenced by em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::em_pqueue(), and singleMerge().
| const char * AMI_STREAM< T >::name | ( | ) | const |
Definition at line 437 of file ami_stream.h.
References UntypedStream::path.
Referenced by em_buffer< T, Key >::cleanup(), em_buffer< T, Key >::get_stream(), em_buffer< T, Key >::insert(), em_buffer< T, Key >::put_stream(), ReplacementHeap< T, Compare >::ReplacementHeap(), em_buffer< T, Key >::reset(), and em_buffer< T, Key >::~em_buffer().
| AMI_err AMI_STREAM< T >::name | ( | char ** | stream_name | ) |
Definition at line 426 of file ami_stream.h.
References AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), and strcpy.
Referenced by ReplacementHeap< T, Compare >::addRun(), ReplacementHeapBlock< T, Compare >::addRun(), AMI_sort(), Cairo_Driver(), COM_Set_font(), D_open_driver(), dig__read_head(), free_datum_list(), free_ellps_list(), free_fontcap(), G_color_name(), G_color_values(), G_compressor_name(), G_compressor_number(), G_create_alt_env(), G_datum_name(), G_ellipsoid_name(), G_find_color_rule(), G_get_datum_by_name(), G_get_ellipsoid_by_name(), G_get_env_name(), G_get_spheroid_by_name(), G_list_color_rules_description_type(), G_read_datum_table(), G_str_to_color(), GPJ_free_datum(), GPJ_free_ellps(), GPJ_get_datum_by_name(), GPJ_get_ellipsoid_by_name(), HTML_Driver(), I_add_file_to_group_ref(), I_iclass_add_signature(), I_iclass_free_statistics(), I_iclass_init_group(), I_iclass_init_signatures(), I_iclass_init_statistics(), I_iclass_statistics_get_name(), I_list_group(), I_list_group_simple(), I_list_subgroup(), I_sort_signatures_by_semantic_label(), I_SortSigSetBySemanticLabel(), I_transfer_group_ref_file(), em_buffer< T, Key >::insert(), multiMerge(), open_band_files(), parse_fontcap(), PNG_Driver(), ReplacementHeap< T, Compare >::print(), ReplacementHeapBlock< T, Compare >::print(), PS_Driver(), Rast__close_null(), Rast__open_null_write(), Rast__open_old(), Rast__read_null_bits(), Rast__read_null_row_ptrs(), Rast__read_row_ptrs(), Rast__write_null_bits(), read_datum_table(), read_ellipsoid_table(), runFormation(), V1_close_nat(), V1_close_ogr(), V1_close_pg(), V1_open_old_nat(), V1_rewind_ogr(), V1_rewind_pg(), V2_close_ogr(), V2_close_pg(), V2_open_old_ogr(), V2_open_old_pg(), V2_rewind_ogr(), V2_rewind_pg(), Vect__get_path(), Vect__open_old(), Vect__read_head(), Vect_add_dblink(), Vect_check_dblink(), Vect_cidx_open(), Vect_close(), Vect_copy_map_dblinks(), Vect_copy_table_by_cats(), Vect_copy_tables(), Vect_default_field_info(), Vect_delete_line(), Vect_get_dblink(), Vect_get_field_by_name(), Vect_get_full_name(), Vect_get_name(), Vect_map_del_dblink(), Vect_open_fidx(), Vect_open_sidx(), Vect_open_topo(), Vect_read_dblinks(), Vect_rename(), Vect_restore_line(), Vect_rewind(), Vect_rewrite_line(), Vect_save_fidx(), Vect_save_frmt(), Vect_save_topo(), Vect_set_updated(), Vect_subst_var(), Vect_write_dblinks(), Vect_write_line(), and Vedit_snap_point().
| 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, AMI_STREAM< T >::AMI_STREAM(), assert, UntypedStream::eof_reached, UntypedStream::logical_bos, UntypedStream::logical_eos, UntypedStream::per, AMI_STREAM< T >::seek(), st, AMI_STREAM< T >::stream_len(), and UntypedStream::substream_level.
| void AMI_STREAM< T >::persist | ( | persistence | p | ) |
Definition at line 639 of file ami_stream.h.
References UntypedStream::per.
Referenced by em_buffer< T, Key >::insert(), multiMerge(), em_buffer< T, Key >::put_stream(), em_buffer< T, Key >::reset(), and runFormation().
| 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.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_IO_ERROR, AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, UntypedStream::eof_reached, UntypedStream::fp, G_ftell(), and UntypedStream::logical_eos.
Referenced by makeRun_Block().
| 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, AMI_STREAM< T >::AMI_STREAM(), assert, UntypedStream::eof_reached, UntypedStream::fp, G_ftell(), UntypedStream::logical_eos, and AMI_STREAM< T >::read_tmp.
Referenced by em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::empty_buff(), em_buffer< T, Key >::insert(), isSorted(), em_pqueue< T, Key >::merge_buffer(), em_pqueue< T, Key >::merge_bufs2pq(), em_pqueue< T, Key >::merge_streams(), em_buffer< T, Key >::print(), and em_buffer< T, Key >::print_range().
| AMI_err AMI_STREAM< T >::seek | ( | off_t | offset | ) |
Definition at line 445 of file ami_stream.h.
References AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, DEBUG_ASSERT, UntypedStream::fp, G_fseek(), UntypedStream::logical_bos, UntypedStream::logical_eos, and UntypedStream::substream_level.
Referenced by AMI_STREAM< T >::AMI_STREAM(), AMI_STREAM< T >::AMI_STREAM(), em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::empty_buff(), em_buffer< T, Key >::insert(), isSorted(), em_pqueue< T, Key >::merge_buffer(), em_pqueue< T, Key >::merge_bufs2pq(), em_pqueue< T, Key >::merge_streams(), AMI_STREAM< T >::new_substream(), em_buffer< T, Key >::print(), em_buffer< T, Key >::print_range(), runFormation(), seg_pagein(), seg_pageout(), seg_seek(), seg_setup(), Segment_get_row(), and Segment_put_row().
| char * AMI_STREAM< T >::sprint | ( | ) |
Definition at line 652 of file ami_stream.h.
References AMI_STREAM< T >::AMI_STREAM(), and AMI_STREAM< T >::stream_len().
Referenced by em_buffer< T, Key >::get_stream(), and em_buffer< T, Key >::put_stream().
| off_t AMI_STREAM< T >::stream_len | ( | void | ) |
Definition at line 375 of file ami_stream.h.
References AMI_STREAM< T >::AMI_STREAM(), assert, DEBUG_ASSERT, DEBUG_STREAM_LEN, UntypedStream::fp, G_fseek(), and G_ftell().
Referenced by AMI_sort(), em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::empty_buff(), em_pqueue< T, Key >::fillpq(), em_buffer< T, Key >::get_stream(), em_buffer< T, Key >::insert(), em_buffer< T, Key >::insert(), isSorted(), EMPQueueAdaptive< T, Key >::makeExternal(), em_pqueue< T, Key >::merge_buffer(), AMI_STREAM< T >::new_substream(), ReplacementHeap< T, Compare >::print(), ReplacementHeapBlock< T, Compare >::print(), em_buffer< T, Key >::reset(), runFormation(), AMI_STREAM< T >::sprint(), and MEM_STREAM< T >::sprint().
| AMI_err AMI_STREAM< T >::write_array | ( | const T * | data, |
| off_t | len | ||
| ) |
Definition at line 613 of file ami_stream.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, DEBUG_ASSERT, UntypedStream::fp, G_ftell(), and UntypedStream::logical_eos.
Referenced by runFormation().
| 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, AMI_STREAM< T >::AMI_STREAM(), assert, DEBUG_ASSERT, UntypedStream::fp, G_ftell(), and UntypedStream::logical_eos.
Referenced by em_pqueue< T, Key >::em_pqueue(), em_buffer< T, Key >::insert(), EMPQueueAdaptive< T, Key >::makeExternal(), em_pqueue< T, Key >::merge_buffer(), em_pqueue< T, Key >::merge_streams(), im_buffer< T >::save2str(), and singleMerge().
|
protected |
Definition at line 156 of file ami_stream.h.
Referenced by AMI_STREAM< T >::read_item().