cheshirekow  v0.1.0
mpblocks::kd_tree::blocks::Inserter< Traits, Allocator > Class Template Reference

A block which wraps the tree insertion operator. More...

#include <mpblocks/kd_tree/blocks/Inserter.h>

Public Types

typedef Allocator< Node_tAllocator_t
 
typedef Traits::Format_t Format_t
 
typedef std::list< Node_t,
Allocator_t
List_t
 
typedef Traits::Node Node_t
 
typedef Vector_t Point_t
 
typedef Inserter< TraitsThis_t
 
typedef Tree< TraitsTree_t
 
typedef Eigen::Matrix
< Format_t, Traits::NDim, 1 > 
Vector_t
 

Public Member Functions

void insert (const Point_t &x)
 insert the point and emit the new node More...
 
 Inserter (Tree_t *tree=0)
 construct an inserter block wrapping the specified tree object More...
 
List_tnodes ()
 return const reference to the node set More...
 
void reset ()
 destroy nodes stored More...
 
void setTree (Tree_t *tree)
 change the tree object that this block wraps More...
 
sigc::slot< void, const Point_t & > slot_insert ()
 return a slot which calls insert() More...
 
sigc::slot< void > slot_reset ()
 return a slot which calls reset() More...
 

Public Attributes

sigc::signal< void, Node_t * > sig_newNode
 the signal which is emitted when a new node is created by the tree More...
 

Protected Attributes

List_t m_store
 
Tree_tm_tree
 

Detailed Description

template<class Traits, template< class > class Allocator = std::allocator>
class mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >

A block which wraps the tree insertion operator.

It provides one slot which exposes the insert method. When a point is inserted the resulting node that is created is emitted by the sig_newNode signal

Definition at line 46 of file Inserter.h.

Member Typedef Documentation

template<class Traits , template< class > class Allocator = std::allocator>
typedef Allocator<Node_t> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::Allocator_t

Definition at line 52 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Traits::Format_t mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::Format_t

Definition at line 49 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef std::list<Node_t,Allocator_t> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::List_t

Definition at line 60 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Traits::Node mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::Node_t

Definition at line 50 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Vector_t mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::Point_t

Definition at line 54 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Inserter<Traits> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::This_t

Definition at line 59 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Tree<Traits> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::Tree_t

Definition at line 58 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Eigen::Matrix<Format_t,Traits::NDim,1> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::Vector_t

Definition at line 53 of file Inserter.h.

Constructor & Destructor Documentation

template<class Traits , template< class > class Allocator = std::allocator>
mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::Inserter ( Tree_t tree = 0)
inline

construct an inserter block wrapping the specified tree object

Definition at line 71 of file Inserter.h.

Member Function Documentation

template<class Traits , template< class > class Allocator = std::allocator>
void mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::insert ( const Point_t x)
inline

insert the point and emit the new node

Definition at line 80 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
List_t& mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::nodes ( )
inline

return const reference to the node set

Definition at line 102 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
void mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::reset ( )
inline

destroy nodes stored

Definition at line 90 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
void mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::setTree ( Tree_t tree)
inline

change the tree object that this block wraps

Definition at line 76 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
sigc::slot<void,const Point_t&> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::slot_insert ( )
inline

return a slot which calls insert()

Definition at line 94 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
sigc::slot<void> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::slot_reset ( )
inline

return a slot which calls reset()

Definition at line 98 of file Inserter.h.

Member Data Documentation

template<class Traits , template< class > class Allocator = std::allocator>
List_t mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::m_store
protected

Definition at line 64 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
Tree_t* mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::m_tree
protected

Definition at line 63 of file Inserter.h.

template<class Traits , template< class > class Allocator = std::allocator>
sigc::signal<void,Node_t*> mpblocks::kd_tree::blocks::Inserter< Traits, Allocator >::sig_newNode

the signal which is emitted when a new node is created by the tree

Definition at line 68 of file Inserter.h.


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