YARP
Yet Another Robot Platform
yarp::os::YarpPluginSettings Class Reference

Collect hints for finding a particular plugin. More...

#include <yarp/os/YarpPluginSettings.h>

Public Member Functions

 YarpPluginSettings ()
 Constructor. More...
 
void setLibraryMethodName (const std::string &dll_name, const std::string &fn_name)
 Set the name of the library to load and the method name to use as a factory. More...
 
void setPluginName (const std::string &name)
 Set the name of the plugin to load. More...
 
void setClassInfo (const std::string &class_name, const std::string &baseclass_name)
 Set the information about the class and the base class constructed by this plugin. More...
 
bool setSelector (YarpPluginSelector &selector)
 Use a selector to find a plugin or plugins. More...
 
void setVerboseMode (bool verbose)
 Should messages be printed showing what searches YARP is trying out? More...
 
bool readFromSearchable (Searchable &options, const std::string &name)
 Configure settings from a configuration file or other searchable object. More...
 
std::string getPluginName () const
 
std::string getLibraryName () const
 
std::string getMethodName () const
 
YarpPluginSelectorgetSelector () const
 
std::string getWrapperName () const
 
std::string getClassName () const
 
std::string getBaseClassName () const
 
bool open (SharedLibraryFactory &factory)
 Initialize a factory object based on the hints available. More...
 
void reportStatus (SharedLibraryFactory &factory) const
 Give a human-readable report of the status of a factory. More...
 
void reportFailure () const
 Give a human-readable failure-to-load report, summarizing the active hints. More...
 

Detailed Description

Collect hints for finding a particular plugin.

Definition at line 24 of file YarpPluginSettings.h.

Constructor & Destructor Documentation

◆ YarpPluginSettings()

yarp::os::YarpPluginSettings::YarpPluginSettings ( )
inline

Constructor.

Definition at line 30 of file YarpPluginSettings.h.

Member Function Documentation

◆ getBaseClassName()

std::string yarp::os::YarpPluginSettings::getBaseClassName ( ) const
inline
Returns
the name of the base class, if set

Definition at line 188 of file YarpPluginSettings.h.

◆ getClassName()

std::string yarp::os::YarpPluginSettings::getClassName ( ) const
inline
Returns
the name of the class, if set

Definition at line 180 of file YarpPluginSettings.h.

◆ getLibraryName()

std::string yarp::os::YarpPluginSettings::getLibraryName ( ) const
inline
Returns
the name of the shared library, if set

Definition at line 148 of file YarpPluginSettings.h.

◆ getMethodName()

std::string yarp::os::YarpPluginSettings::getMethodName ( ) const
inline
Returns
the name of the factory method, if set

Definition at line 156 of file YarpPluginSettings.h.

◆ getPluginName()

std::string yarp::os::YarpPluginSettings::getPluginName ( ) const
inline
Returns
the name of the plugin, if set

Definition at line 140 of file YarpPluginSettings.h.

◆ getSelector()

YarpPluginSelector* yarp::os::YarpPluginSettings::getSelector ( ) const
inline
Returns
the selector object, if set

Definition at line 164 of file YarpPluginSettings.h.

◆ getWrapperName()

std::string yarp::os::YarpPluginSettings::getWrapperName ( ) const
inline
Returns
the name of the wrapper, if set

Definition at line 172 of file YarpPluginSettings.h.

◆ open()

bool YarpPluginSettings::open ( SharedLibraryFactory factory)

Initialize a factory object based on the hints available.

Parameters
factorythe factory to initialize
Returns
true on success

Definition at line 83 of file YarpPlugin.cpp.

◆ readFromSearchable()

bool yarp::os::YarpPluginSettings::readFromSearchable ( Searchable options,
const std::string &  name 
)
inline

Configure settings from a configuration file or other searchable object.

Parameters
optionsconfiguration object to read from
namefallback name for plugin if not in configuration
Returns
true on success

Definition at line 119 of file YarpPluginSettings.h.

◆ reportFailure()

void YarpPluginSettings::reportFailure ( ) const

Give a human-readable failure-to-load report, summarizing the active hints.

Definition at line 188 of file YarpPlugin.cpp.

◆ reportStatus()

void YarpPluginSettings::reportStatus ( SharedLibraryFactory factory) const

Give a human-readable report of the status of a factory.

Parameters
factorythe factory about which to report

Definition at line 157 of file YarpPlugin.cpp.

◆ setClassInfo()

void yarp::os::YarpPluginSettings::setClassInfo ( const std::string &  class_name,
const std::string &  baseclass_name 
)
inline

Set the information about the class and the base class constructed by this plugin.

Parameters
class_namethe name of the class
baseclass_namethe name of the base class

Definition at line 73 of file YarpPluginSettings.h.

◆ setLibraryMethodName()

void yarp::os::YarpPluginSettings::setLibraryMethodName ( const std::string &  dll_name,
const std::string &  fn_name 
)
inline

Set the name of the library to load and the method name to use as a factory.

The library can include a complete path, or be left to the operating system to find according to the regular search path for libraries. Prefixes and suffixes such as "lib", ".dll", ".so", ".dylib" may be omitted.

Parameters
dll_namethe name of the shared library to load
fn_namethe name of the method within that library to use as a factory

Definition at line 47 of file YarpPluginSettings.h.

◆ setPluginName()

void yarp::os::YarpPluginSettings::setPluginName ( const std::string &  name)
inline

Set the name of the plugin to load.

If a corresponding YARP configuration file can be found, this may be a sufficient hint for YARP to fill in everything else.

Parameters
namethe name of the plugin to load

Definition at line 61 of file YarpPluginSettings.h.

◆ setSelector()

bool yarp::os::YarpPluginSettings::setSelector ( YarpPluginSelector selector)
inline

Use a selector to find a plugin or plugins.

If the name of the plugin has already been set, the selector will be used to increase what is known about the plugin.

Parameters
selectorthe yarp::os::YarpPluginSelector to use
Returns
true if a section about the plugin was found

Definition at line 90 of file YarpPluginSettings.h.

◆ setVerboseMode()

void YarpPluginSettings::setVerboseMode ( bool  verbose)

Should messages be printed showing what searches YARP is trying out?

Parameters
verboseverbosity flag
Deprecated:
since YARP 3.4

Definition at line 34 of file YarpPlugin.cpp.


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