nodelet::Loader Class Reference

A class which will construct and sequentially call Nodelets according to xml This is the primary way in which users are expected to interact with Nodelets. More...

#include <loader.h>

List of all members.

Public Member Functions

bool clear ()
 Clear all nodelets from this loader.
std::vector< std::string > listLoadedNodelets ()
 List the names of all loaded nodelets.
bool load (const std::string &name, const std::string &type, const M_string &remappings, const V_string &my_argv, boost::shared_ptr< bond::Bond > bond=boost::shared_ptr< bond::Bond >((bond::Bond *) NULL))
 Loader (ros::NodeHandle server_nh)
 Construct the nodelet loader with optional ros API in namespace of passed NodeHandle.
 Loader (bool provide_ros_api=true)
 Construct the nodelet loader with optional ros API at default location of NodeHandle("~").
bool unload (const std::string &name)
 ~Loader ()

Private Types

typedef boost::shared_ptr
< pluginlib::ClassLoader
< Nodelet > > 
ClassLoaderPtr
typedef std::map< std::string,
NodeletPtr
M_stringToNodelet

Private Member Functions

void constructorImplementation (bool provide_ros_api, ros::NodeHandle server_nh)

Private Attributes

detail::CallbackQueueManagerPtr callback_manager_
ClassLoaderPtr loader_
boost::mutex lock_
 ! A lock to protect internal integrity. Every external method should lock it for safety.
M_stringToNodelet nodelets_
 ! A map of name to pointers of currently constructed nodelets
detail::LoaderROSPtr services_

Detailed Description

A class which will construct and sequentially call Nodelets according to xml This is the primary way in which users are expected to interact with Nodelets.

Definition at line 74 of file loader.h.


Member Typedef Documentation

typedef boost::shared_ptr<pluginlib::ClassLoader<Nodelet> > nodelet::Loader::ClassLoaderPtr [private]

Definition at line 101 of file loader.h.

typedef std::map<std::string, NodeletPtr> nodelet::Loader::M_stringToNodelet [private]

Definition at line 98 of file loader.h.


Constructor & Destructor Documentation

nodelet::Loader::Loader ( bool  provide_ros_api = true  ) 

Construct the nodelet loader with optional ros API at default location of NodeHandle("~").

Definition at line 124 of file loader.cpp.

nodelet::Loader::Loader ( ros::NodeHandle  server_nh  ) 

Construct the nodelet loader with optional ros API in namespace of passed NodeHandle.

Definition at line 130 of file loader.cpp.

nodelet::Loader::~Loader (  ) 

Definition at line 160 of file loader.cpp.


Member Function Documentation

bool nodelet::Loader::clear (  ) 

Clear all nodelets from this loader.

Clear all nodelets from this chain.

Todo:
This isn't really safe - can result in worker threads for outstanding callbacks operating on nodelet data as/after it's destroyed.

Definition at line 230 of file loader.cpp.

void nodelet::Loader::constructorImplementation ( bool  provide_ros_api,
ros::NodeHandle  server_nh 
) [private]

Definition at line 136 of file loader.cpp.

std::vector< std::string > nodelet::Loader::listLoadedNodelets (  ) 

List the names of all loaded nodelets.

Definition at line 240 of file loader.cpp.

bool nodelet::Loader::load ( const std::string &  name,
const std::string &  type,
const M_string remappings,
const V_string my_argv,
boost::shared_ptr< bond::Bond >  bond = boost::shared_ptr< bond::Bond >((bond::Bond *) NULL) 
)
bool nodelet::Loader::unload ( const std::string &  name  ) 

Definition at line 214 of file loader.cpp.


Member Data Documentation

Definition at line 104 of file loader.h.

Definition at line 102 of file loader.h.

boost::mutex nodelet::Loader::lock_ [private]

! A lock to protect internal integrity. Every external method should lock it for safety.

Definition at line 95 of file loader.h.

! A map of name to pointers of currently constructed nodelets

Definition at line 99 of file loader.h.

Definition at line 96 of file loader.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines


nodelet
Author(s): Tully Foote, Radu Bogdan Rusu
autogenerated on Fri Jan 11 11:44:26 2013