maliput
Passkey< T > Class Template Reference

Detailed Description

template<class T>
class maliput::common::Passkey< T >

Simple generic implementation of the "Passkey Idiom".

Passkey<T> allows a class to provide method-level friendship to another class. By tagging an otherwise public method with a Passkey<Other> parameter, only the class Other will be able to construct the required passkey and call the method (typically using just {} to construct the passkey instance at the call site).

See also
https://arne-mertz.de/2016/10/passkey-idiom/
https://stackoverflow.com/questions/3324898/can-we-increase-the-re-usability-of-this-key-oriented-access-protection-pattern

#include <include/maliput/common/passkey.h>


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