GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71759
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

template<class T >
AMI_STREAM< T >::AMI_STREAM ( )
template<class T >
AMI_STREAM< T >::AMI_STREAM ( const char *  path_name,
AMI_stream_type  st = AMI_READ_WRITE_STREAM 
)
template<class T >
AMI_STREAM< T >::~AMI_STREAM ( void  )

Definition at line 517 of file ami_stream.h.

References DEBUG_ASSERT, DEBUG_DELETE, fclose(), and PERSIST_PERSISTENT.

Member Function Documentation

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

Definition at line 679 of file ami_stream.h.

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

Definition at line 451 of file ami_stream.h.

template<class T >
AMI_err AMI_STREAM< T >::new_substream ( AMI_stream_type  st,
off_t  sub_begin,
off_t  sub_end,
AMI_STREAM< T > **  sub_stream 
)
template<class T >
void AMI_STREAM< T >::persist ( persistence  p)

Definition at line 657 of file ami_stream.h.

Referenced by em_buffer< T, Key >::insert(), multiMerge(), and runFormation().

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.

References AMI_ERROR_END_OF_STREAM, AMI_ERROR_IO_ERROR, AMI_ERROR_NO_ERROR, and G_ftell().

Referenced by makeRun_Block().

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

Definition at line 671 of file ami_stream.h.

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.

References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, DEBUG_ASSERT, and G_ftell().

Referenced by runFormation().

Field Documentation

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: