tesseract v5.3.3.20231005
tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME > Class Template Reference

#include <list.h>

Inheritance diagram for tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >:

Public Member Functions

 X_LIST ()=default
 
 X_LIST (const X_LIST &)=delete
 
X_LISToperator= (const X_LIST &)=delete
 
 ~X_LIST ()
 
void clear ()
 
template<typename U >
void deep_copy (const U *src_list, CLASSNAME *(*copier)(const CLASSNAME *))
 

Detailed Description

template<typename CONTAINER, typename ITERATOR, typename CLASSNAME>
class tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >

Definition at line 43 of file list.h.

Constructor & Destructor Documentation

◆ X_LIST() [1/2]

template<typename CONTAINER , typename ITERATOR , typename CLASSNAME >
tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >::X_LIST ( )
default

◆ X_LIST() [2/2]

template<typename CONTAINER , typename ITERATOR , typename CLASSNAME >
tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >::X_LIST ( const X_LIST< CONTAINER, ITERATOR, CLASSNAME > &  )
delete

◆ ~X_LIST()

template<typename CONTAINER , typename ITERATOR , typename CLASSNAME >
tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >::~X_LIST ( )
inline

Definition at line 48 of file list.h.

48 {
49 clear();
50 }
void clear()
Definition: list.h:53

Member Function Documentation

◆ clear()

template<typename CONTAINER , typename ITERATOR , typename CLASSNAME >
void tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >::clear ( )
inline

Definition at line 53 of file list.h.

53 {
54 CONTAINER::internal_clear([](void *link) {delete reinterpret_cast<CLASSNAME *>(link);});
55 }

◆ deep_copy()

template<typename CONTAINER , typename ITERATOR , typename CLASSNAME >
template<typename U >
void tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >::deep_copy ( const U *  src_list,
CLASSNAME *(*)(const CLASSNAME *)  copier 
)
inline

Definition at line 59 of file list.h.

59 {
60 X_ITER<ITERATOR, CLASSNAME> from_it(const_cast<U *>(src_list));
61 X_ITER<ITERATOR, CLASSNAME> to_it(this);
62
63 for (from_it.mark_cycle_pt(); !from_it.cycled_list(); from_it.forward())
64 to_it.add_after_then_move((*copier)(from_it.data()));
65 }

◆ operator=()

template<typename CONTAINER , typename ITERATOR , typename CLASSNAME >
X_LIST & tesseract::X_LIST< CONTAINER, ITERATOR, CLASSNAME >::operator= ( const X_LIST< CONTAINER, ITERATOR, CLASSNAME > &  )
delete

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