WPILibC++ 2023.4.3
frc2::CommandHelper< Base, CRTP, typename > Class Template Reference

CRTP implementation to allow polymorphic decorator functions in Command. More...

#include <frc2/command/CommandHelper.h>

Inheritance diagram for frc2::CommandHelper< Base, CRTP, typename >:

Public Member Functions

 CommandHelper ()=default
 
CommandPtr ToPtr () &&override
 

Protected Member Functions

std::unique_ptr< CommandTransferOwnership () &&override
 

Detailed Description

template<typename Base, typename CRTP, typename = std::enable_if_t<std::is_base_of_v<Command, Base>>>
class frc2::CommandHelper< Base, CRTP, typename >

CRTP implementation to allow polymorphic decorator functions in Command.

Note: ALWAYS create a subclass by extending CommandHelper<Base, Subclass>, or decorators will not function!

This class is provided by the NewCommands VendorDep

Constructor & Destructor Documentation

◆ CommandHelper()

template<typename Base , typename CRTP , typename = std::enable_if_t<std::is_base_of_v<Command, Base>>>
frc2::CommandHelper< Base, CRTP, typename >::CommandHelper ( )
default

Member Function Documentation

◆ ToPtr()

template<typename Base , typename CRTP , typename = std::enable_if_t<std::is_base_of_v<Command, Base>>>
CommandPtr frc2::CommandHelper< Base, CRTP, typename >::ToPtr ( ) &&
inlineoverride

◆ TransferOwnership()

template<typename Base , typename CRTP , typename = std::enable_if_t<std::is_base_of_v<Command, Base>>>
std::unique_ptr< Command > frc2::CommandHelper< Base, CRTP, typename >::TransferOwnership ( ) &&
inlineoverrideprotected

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