Skip to content
Snippets Groups Projects
Commit fcb3584c authored by Mirko Wächter's avatar Mirko Wächter
Browse files

added convenience function

parent 0ea1dae6
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,21 @@ namespace armarx
{
public:
size_t load(const MultiNodeRapidXMLReader &rootNodeConfigs, const VirtualRobot::RobotPtr& robot);
template <typename Type>
std::vector<std::shared_ptr<Type>> getDevicesOfType() const
{
std::vector<std::shared_ptr<Type>> results;
for (auto& dev : devices)
{
auto castedDev = std::dynamic_pointer_cast<Type>(dev);
if(castedDev)
{
results.push_back(castedDev);
}
}
return results;
}
std::vector<AbstractFunctionalDevicePtr> getAllInitializedFunctionalDevices() const;
std::vector<AbstractFunctionalDevicePtr> getAllUninitializedFunctionalDevices() const;
virtual std::vector<AbstractFunctionalDevicePtr> getAllFunctionalDevices() const = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment