GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-602118adcc
im_buffer< T > Class Template Reference

#include <imbuffer.h>

Public Member Functions

 im_buffer (long n)
 
 im_buffer (const im_buffer &b)
 
 ~im_buffer ()
 
bool insert (T &x)
 
unsigned long insert (T *x, unsigned long n)
 
void sort ()
 
unsigned long get_buf_maxlen () const
 
unsigned long get_buf_len () const
 
bool is_full () const
 
bool is_empty () const
 
get_item (unsigned long i) const
 
T * get_array () const
 
AMI_STREAM< T > * save2str () const
 
void set_item (unsigned long i, T &item)
 
void reset ()
 
void clear ()
 
void reset (unsigned long start, unsigned long n)
 
void shift_left (unsigned long n)
 
void print_range () const
 
void print () const
 

Friends

ostream & operator<< (ostream &s, const im_buffer &b)
 

Detailed Description

template<class T>
class im_buffer< T >

Definition at line 71 of file imbuffer.h.

Constructor & Destructor Documentation

◆ im_buffer() [1/2]

template<class T >
im_buffer< T >::im_buffer ( long  n)
inline

Definition at line 89 of file imbuffer.h.

References assert, and MEMORY_LOG().

◆ im_buffer() [2/2]

template<class T >
im_buffer< T >::im_buffer ( const im_buffer< T > &  b)

Definition at line 206 of file imbuffer.h.

References assert, b, and MEMORY_LOG().

◆ ~im_buffer()

template<class T >
im_buffer< T >::~im_buffer ( )
inline

Definition at line 106 of file imbuffer.h.

Member Function Documentation

◆ clear()

template<class T >
void im_buffer< T >::clear ( )
inline

Definition at line 167 of file imbuffer.h.

◆ get_array()

template<class T >
T* im_buffer< T >::get_array ( ) const
inline

Definition at line 142 of file imbuffer.h.

◆ get_buf_len()

template<class T >
unsigned long im_buffer< T >::get_buf_len ( ) const
inline

Definition at line 126 of file imbuffer.h.

◆ get_buf_maxlen()

template<class T >
unsigned long im_buffer< T >::get_buf_maxlen ( ) const
inline

Definition at line 123 of file imbuffer.h.

◆ get_item()

template<class T >
T im_buffer< T >::get_item ( unsigned long  i) const
inline

Definition at line 135 of file imbuffer.h.

References assert.

◆ insert() [1/2]

template<class T >
bool im_buffer< T >::insert ( T &  x)

Definition at line 223 of file imbuffer.h.

◆ insert() [2/2]

template<class T >
unsigned long im_buffer< T >::insert ( T *  x,
unsigned long  n 
)

Definition at line 245 of file imbuffer.h.

References assert, and x.

◆ is_empty()

template<class T >
bool im_buffer< T >::is_empty ( ) const
inline

Definition at line 132 of file imbuffer.h.

◆ is_full()

template<class T >
bool im_buffer< T >::is_full ( ) const
inline

Definition at line 129 of file imbuffer.h.

◆ print()

template<class T >
void im_buffer< T >::print

Definition at line 403 of file imbuffer.h.

◆ print_range()

template<class T >
void im_buffer< T >::print_range

Definition at line 361 of file imbuffer.h.

◆ reset() [1/2]

template<class T >
void im_buffer< T >::reset ( )
inline

Definition at line 156 of file imbuffer.h.

References NULL.

◆ reset() [2/2]

template<class T >
void im_buffer< T >::reset ( unsigned long  start,
unsigned long  n 
)

Definition at line 327 of file imbuffer.h.

References assert.

◆ save2str()

template<class T >
AMI_STREAM< T > * im_buffer< T >::save2str

Definition at line 416 of file imbuffer.h.

References assert, and AMI_STREAM< T >::write_item().

◆ set_item()

template<class T >
void im_buffer< T >::set_item ( unsigned long  i,
T &  item 
)
inline

Definition at line 148 of file imbuffer.h.

References assert.

◆ shift_left()

template<class T >
void im_buffer< T >::shift_left ( unsigned long  n)

Definition at line 348 of file imbuffer.h.

References assert.

◆ sort()

template<class T >
void im_buffer< T >::sort

Definition at line 262 of file imbuffer.h.

Friends And Related Function Documentation

◆ operator<<

template<class T >
ostream& operator<< ( ostream &  s,
const im_buffer< T > &  b 
)
friend

Definition at line 180 of file imbuffer.h.


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