maliput
|
Macros | |||
Class template instantiation macros | |||
These macros either declare or define class template instantiations for Drake's supported scalar types (see Default Scalars), either "default scalars" or "default nonsymbolic scalars". Use the
Example #include "maliput/drake/common/default_scalars.h"
namespace sample {
template <typename T>
...
};
} // namespace sample
class ::sample::MySystem)
Example #include "my_system.h"
class ::sample::MySystem)
See also System Scalar Conversion. | |||
#define | DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS(SomeType) template SomeType<double>; | ||
Defines template instantiations for Drake's default scalars. More... | |||
#define | DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS(SomeType) template SomeType<double>; | ||
Defines template instantiations for Drake's default nonsymbolic scalars. More... | |||
#define | DRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS(SomeType) extern template SomeType<double>; | ||
Declares that template instantiations exist for Drake's default scalars. More... | |||
#define | DRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS(SomeType) extern template SomeType<double>; | ||
Declares that template instantiations exist for Drake's default nonsymbolic scalars. More... | |||
Function template instantiation macros | |||
These macros define template function instantiations for Drake's supported scalar types (see Default Scalars), either "default scalars" or "default nonsymbolic scalars". Use the
Example #include "maliput/drake/common/default_scalars.h"
namespace sample {
template <typename T>
double Func1(const T&);
template <typename T, typename U>
double Func2(const T&, const U&);
template <typename T>
class SomeClass {
...
template <typename U>
SomeClass cast() const;
...
};
} // namespace sample
Example #include "example.h"
namespace sample {
template <typename T>
double Func1(const T&) {
...
}
template <typename T, typename U>
double Func2(const T&, const U&) {
...
}
template <typename T>
template <typename U>
SomeClass<T>::SomeClass::cast() const {
...
};
// N.B. Place the macro invocation inside the functions' namespace.
&Func1<T>,
&Func2<T, U>,
&SomeClass<T>::template cast<U>
))
} // namespace sample
| |||
#define | DRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS(FunctionPointersTuple) | ||
Defines template instantiations for Drake's default scalars. More... | |||
#define | DRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS(FunctionPointersTuple) | ||
Defines template instantiations for Drake's default nonsymbolic scalars. More... | |||