when allocating memory, we need space for a whole node, not just the payload
More...we provide our own linked list for ResElems that provides a custom allocator and a method to append an element to the list without copying data, i.e. constructing a new element in place. This used to be based on the standard library list, but I'm no longer in the mood to keep up with changing internals in both libstdc++ (GNU) and LIBCPP (LLVM).
see http://www.panix.com/~elflord/cpp/list_howto/ for a reference on circular lists with sentinels
PooledList< T >::PooledList | ( | Pool * | pool | ) | [inline] |
References PooledList< T >::Node::m_next, and PooledList< T >::m_node.
PooledList< T >::PooledList | ( | const PooledList< T > & | L | ) | [inline] |
PooledList< T >::~PooledList | ( | ) | [inline] |
References PooledList< T >::clear(), PooledList< T >::dealloc(), and PooledList< T >::m_node.
Node* PooledList< T >::alloc | ( | void | ) | [inline] |
References Pool::Allocate(), PooledList< T >::Node::m_next, and PooledList< T >::m_pool.
Referenced by PooledList< T >::insert(), and PooledList< T >::push_back_noconstruct().
void PooledList< T >::dealloc | ( | Node * | n | ) | [inline] |
References Pool::Deallocate(), PooledList< T >::Node::m_next, and PooledList< T >::m_pool.
Referenced by PooledList< T >::erase(), and PooledList< T >::~PooledList().
void PooledList< T >::reverse | ( | ) | [inline] |
References PooledList< T >::empty(), PooledList< T >::Node::m_next, and PooledList< T >::m_node.
Referenced by PooledList< T >::PooledList().
void PooledList< T >::swap | ( | PooledList< T > & | x | ) | [inline] |
References PooledList< T >::m_node.
Referenced by PooledList< T >::operator=().
PooledList& PooledList< T >::operator= | ( | const PooledList< T > & | x | ) | [inline] |
References PooledList< T >::swap().
void PooledList< T >::clear | ( | ) | [inline] |
References PooledList< T >::empty(), and PooledList< T >::pop_front().
Referenced by PooledList< T >::~PooledList().
void PooledList< T >::push_front | ( | const T & | x | ) | [inline] |
References PooledList< T >::begin(), and PooledList< T >::insert().
Referenced by PooledList< T >::PooledList().
void PooledList< T >::push_back | ( | const T & | x | ) | [inline] |
References PooledList< T >::end(), and PooledList< T >::insert().
T* PooledList< T >::push_back_noconstruct | ( | void | ) | [inline] |
void PooledList< T >::pop_front | ( | ) | [inline] |
References PooledList< T >::begin(), and PooledList< T >::erase().
Referenced by PooledList< T >::clear().
bool PooledList< T >::empty | ( | ) | [inline] |
References PooledList< T >::Node::m_next, and PooledList< T >::m_node.
Referenced by PooledList< T >::clear(), and PooledList< T >::reverse().
T& PooledList< T >::front | ( | ) | [inline] |
References PooledList< T >::begin().
const T& PooledList< T >::front | ( | ) | const [inline] |
References PooledList< T >::begin().
T& PooledList< T >::back | ( | ) | [inline] |
References PooledList< T >::Node::m_data, and PooledList< T >::m_node.
const T& PooledList< T >::back | ( | ) | const [inline] |
References PooledList< T >::m_node.
iterator PooledList< T >::begin | ( | ) | [inline] |
References PooledList< T >::Node::m_next, and PooledList< T >::m_node.
Referenced by SourceSimulator::add_continuum_source_to_images(), add_flux_in_fibers(), SourceSimulator::add_line_source_to_images(), SourceSimulator::add_sersic_source_to_images(), PointSourceDetector::compute_chi2(), PointSourceDetector::compute_chi2_stacked(), PointSourceDetector::compute_sigma(), ContSourceDetector::compute_sigma(), PointSourceDetector::count_res_elems(), PointSource::debug_reselem_list(), PointSourceDetector::equivalent_width(), extract_fibers_in_aperture(), Projector::fill_in_point_source_model(), PooledList< T >::front(), PointSourceDetector::make_image(), PointSourceDetector::make_image_header(), PointSourceDetector::normalize_model(), PointSourceDetector::photometry(), PooledList< T >::PooledList(), PooledList< T >::pop_front(), and PooledList< T >::push_front().
iterator PooledList< T >::end | ( | ) | [inline] |
References PooledList< T >::m_node.
Referenced by SourceSimulator::add_continuum_source_to_images(), add_flux_in_fibers(), SourceSimulator::add_line_source_to_images(), SourceSimulator::add_sersic_source_to_images(), PointSourceDetector::compute_chi2(), PointSourceDetector::compute_chi2_stacked(), PointSourceDetector::compute_sigma(), ContSourceDetector::compute_sigma(), PointSourceDetector::count_res_elems(), PointSource::debug_reselem_list(), PointSourceDetector::equivalent_width(), PooledList< T >::erase(), extract_fibers_in_aperture(), Projector::fill_in_point_source_model(), PointSourceDetector::make_image(), PointSourceDetector::make_image_header(), PointSourceDetector::normalize_model(), PointSourceDetector::photometry(), PooledList< T >::PooledList(), PooledList< T >::push_back(), PooledList< T >::push_back_noconstruct(), and PooledList< T >::rotate().
const_iterator PooledList< T >::begin | ( | ) | const [inline] |
References PooledList< T >::Node::m_next, and PooledList< T >::m_node.
const_iterator PooledList< T >::end | ( | ) | const [inline] |
References PooledList< T >::m_node.
void PooledList< T >::erase | ( | iterator | x | ) | [inline] |
References PooledList< T >::dealloc(), PooledList< T >::end(), PooledList< T >::Node::m_next, PooledList< T >::m_node, and PooledList< T >::iterator::m_rep.
Referenced by PooledList< T >::pop_front().
void PooledList< T >::insert | ( | iterator | x, | |
const T & | y | |||
) | [inline] |
void PooledList< T >::rotate | ( | iterator | x | ) | [inline] |
Pool* PooledList< T >::m_pool [private] |
Referenced by PooledList< T >::alloc(), and PooledList< T >::dealloc().
Node* PooledList< T >::m_node [private] |
Referenced by PooledList< T >::back(), PooledList< T >::begin(), PooledList< T >::empty(), PooledList< T >::end(), PooledList< T >::erase(), PooledList< T >::insert(), PooledList< T >::PooledList(), PooledList< T >::push_back_noconstruct(), PooledList< T >::reverse(), PooledList< T >::rotate(), PooledList< T >::swap(), and PooledList< T >::~PooledList().