YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::os::YarpPluginSettings Class Reference

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

#include <yarp/os/YarpPluginSettings.h>

Public Member Functions

 YarpPluginSettings ()=default
 Constructor.
 
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.
 
void setPluginName (const std::string &name)
 Set the name of the plugin to load.
 
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.
 
bool setSelector (YarpPluginSelector &selector)
 Use a selector to find a plugin or plugins.
 
void setVerboseMode (bool verbose)
 Should messages be printed showing what searches YARP is trying out?
 
bool readFromSearchable (Searchable &options, const std::string &name)
 Configure settings from a configuration file or other searchable object.
 
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.
 
void reportStatus (SharedLibraryFactory &factory) const
 Give a human-readable report of the status of a factory.
 
void reportFailure () const
 Give a human-readable failure-to-load report, summarizing the active hints.
 

Detailed Description

Collect hints for finding a particular plugin.

Definition at line 20 of file YarpPluginSettings.h.

Constructor & Destructor Documentation

◆ YarpPluginSettings()

yarp::os::YarpPluginSettings::YarpPluginSettings ( )
default

Constructor.

Member Function Documentation

◆ getBaseClassName()

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

Definition at line 183 of file YarpPluginSettings.h.

◆ getClassName()

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

Definition at line 175 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 143 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 151 of file YarpPluginSettings.h.

◆ getPluginName()

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

Definition at line 135 of file YarpPluginSettings.h.

◆ getSelector()

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

Definition at line 159 of file YarpPluginSettings.h.

◆ getWrapperName()

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

Definition at line 167 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 81 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 111 of file YarpPluginSettings.h.

◆ reportFailure()

void YarpPluginSettings::reportFailure ( ) const

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

Definition at line 198 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 167 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 65 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 39 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 53 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 82 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 32 of file YarpPlugin.cpp.


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