RobWorkProject  24.12.4-
Public Types | Public Member Functions | List of all members
AssemblyRegistry Class Reference

A registry of control strategies. The registry defines an extension point. More...

#include <AssemblyRegistry.hpp>

Inherits ExtensionPoint< AssemblyControlStrategy >.

Public Types

typedef rw::core::Ptr< AssemblyRegistryPtr
 smart pointer type to this class
 
- Public Types inherited from ExtensionPoint< AssemblyControlStrategy >
typedef rw::core::Ptr< ExtensionPointPtr
 smart pointer type of ExtensionPoint
 

Public Member Functions

 AssemblyRegistry ()
 Constructor of initial registry (RobWork strategies are added)
 
virtual ~AssemblyRegistry ()
 Destructor.
 
void addStrategy (const std::string id, rw::core::Ptr< AssemblyControlStrategy > strategy)
 Add a new strategy. More...
 
std::vector< std::string > getStrategies () const
 Get the available strategies. More...
 
bool hasStrategy (const std::string &id) const
 Check if strategy is available. More...
 
rw::core::Ptr< AssemblyControlStrategygetStrategy (const std::string &id) const
 Get the strategy with a specific identifier. More...
 
- Public Member Functions inherited from ExtensionPoint< AssemblyControlStrategy >
 ExtensionPoint (const std::string &id, const std::string &name, Plugin *plugin=NULL)
 Constructor. More...
 
const std::string & getId () const
 get unique identifier of this extensionpoint
 
const std::string & getName () const
 get human readable name of this extension point
 
const rw::core::PropertyMapgetSchema () const
 the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point.
 
std::vector< rw::core::Extension::DescriptorgetExtensionDescriptors () const
 get all extension descriptions of this extension point
 
std::vector< rw::core::Ptr< Extension > > getExtensions () const
 get all extensions of this extension point
 

Additional Inherited Members

- Protected Member Functions inherited from ExtensionPoint< AssemblyControlStrategy >
rw::core::PropertyMapgetSchema ()
 the schema describe the possible properties/configurations elements which is used in the PropertyMap. The schema property map should just be loaded with all possible configuration options which the extension might use. More...
 

Detailed Description

A registry of control strategies. The registry defines an extension point.

Users can define custom assembly control strategies in two ways. Either an extension must be registered, or the user must create an AssemblyRegistry and add the strategy to this registry manually.

Member Function Documentation

◆ addStrategy()

void addStrategy ( const std::string  id,
rw::core::Ptr< AssemblyControlStrategy strategy 
)

Add a new strategy.

Parameters
id[in] an identifier for this specific strategy (this id is used for serialization).
strategy[in] a pointer to the AssemblyControlStrategy.

◆ getStrategies()

std::vector<std::string> getStrategies ( ) const

Get the available strategies.

Returns
a vector of identifiers for strategies.

◆ getStrategy()

rw::core::Ptr<AssemblyControlStrategy> getStrategy ( const std::string &  id) const

Get the strategy with a specific identifier.

Parameters
id[in] the identifier.
Returns
a pointer to the strategy.

◆ hasStrategy()

bool hasStrategy ( const std::string &  id) const

Check if strategy is available.

Parameters
id[in] the name of the strategy.
Returns
true if available, false otherwise.

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