Drake
SystemTypeTag< S > Struct Template Reference

A tag object that denotes a System subclass S in function signatures. More...

#include <drake/systems/framework/system_type_tag.h>

Public Member Functions

 SystemTypeTag ()
 

Detailed Description

template<template< typename > class S>
struct drake::systems::SystemTypeTag< S >

A tag object that denotes a System subclass S in function signatures.

For example, SystemTypeTag<MySystem>{} will create a dummy object that can be used to call functions that look like:

template <template <typename> class S>
const char* get_foo(SystemTypeTag<S>) { return S<double>::get_foo(); }
int main() {
std::cout << get_foo(SystemTypeTag<MySystem>{});
}

In this case, we could directly call get_foo<MySystem>() by specifying the template argument, but that is not always possible. In particular, tag objects are acutely useful when calling templated constructors, because there is no other mechanism for the caller to specify the template type.

Constructor & Destructor Documentation

SystemTypeTag ( )
inline

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