SubZero Common
Common library components for an FRC CommandRobot
Loading...
Searching...
No Matches
subzero::AutoFactory< T > Class Template Reference

Safely get an auto command from PPLib without the risk of crashing from a missing auto file. More...

#include <AutoFactory.h>

Public Member Functions

 AutoFactory (const std::map< T, std::string > &autos)
 
frc2::CommandPtr GetAuto (T type)
 Get the auto command specified by the key.
 

Detailed Description

template<typename T>
class subzero::AutoFactory< T >

Safely get an auto command from PPLib without the risk of crashing from a missing auto file.

Template Parameters
TKey for identifying the auto, typically an enum
Remarks
Will return an empty command if the auto does not exist

Definition at line 29 of file AutoFactory.h.

Constructor & Destructor Documentation

◆ AutoFactory()

template<typename T >
subzero::AutoFactory< T >::AutoFactory ( const std::map< T, std::string > & autos)
inlineexplicit

Definition at line 31 of file AutoFactory.h.

Member Function Documentation

◆ GetAuto()

template<typename T >
frc2::CommandPtr subzero::AutoFactory< T >::GetAuto ( T type)

Get the auto command specified by the key.

Parameters
type
Returns
frc2::CommandPtr The schedulable auto command

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