GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
AMI_STREAM< T > Class Template Reference

#include <ami_stream.h>

Inheritance diagram for AMI_STREAM< T >:
Collaboration diagram for AMI_STREAM< T >:

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

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
 

Detailed Description

template<class T>
class AMI_STREAM< T >

Definition at line 159 of file ami_stream.h.

Constructor & Destructor Documentation

◆ AMI_STREAM() [1/2]

◆ AMI_STREAM() [2/2]

◆ ~AMI_STREAM()

Member Function Documentation

◆ eof()

template<class T >
int AMI_STREAM< T >::eof ( )

Definition at line 679 of file ami_stream.h.

References UntypedStream::eof_reached.

◆ main_memory_usage()

template<class T >
AMI_err AMI_STREAM< T >::main_memory_usage ( size_t *  usage,
MM_stream_usage  usage_type = MM_STREAM_USAGE_OVERHEAD 
)
static

Definition at line 494 of file ami_stream.h.

◆ name() [1/2]

template<class T >
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().

◆ name() [2/2]

template<class T >
const char * AMI_STREAM< T >::name ( ) const

Definition at line 451 of file ami_stream.h.

References UntypedStream::path.

◆ new_substream()

◆ persist()

template<class T >
void AMI_STREAM< T >::persist ( persistence  p)

Definition at line 657 of file ami_stream.h.

References UntypedStream::per.

◆ read_array()

template<class T >
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.

◆ read_item()

◆ seek()

◆ sprint()

template<class T >
char * AMI_STREAM< T >::sprint ( )

Definition at line 671 of file ami_stream.h.

◆ stream_len()

template<class T >
off_t AMI_STREAM< T >::stream_len ( void  )

◆ write_array()

template<class T >
AMI_err AMI_STREAM< T >::write_array ( const T *  data,
off_t  len 
)

Definition at line 631 of file ami_stream.h.

◆ write_item()

Field Documentation

◆ read_tmp

template<class T>
T AMI_STREAM< T >::read_tmp
protected

Definition at line 163 of file ami_stream.h.


The documentation for this class was generated from the following file: