template <class InstanceGetProvider>

class GetProvider

Defined at line 80 of file ../../third_party/openthread/src/core/common/locator.hpp

Implements `Get

<Type

>()` method for different `Type` objects belonging to the OpenThread

instance.

Users of this class MUST follow CRTP-style inheritance, i.e., the class `Class` itself should publicly inherit

from `GetProvider

<Class

>`.

Template Parameters

InstanceGetProvider The template sub-lass used in CRTP style inheritance. `InstanceGetProvider` MUST provide a method with the following signature: `Instance &GetInstance(void) const`

Public Methods

template <typename Type>
Type & Get ()

Returns a reference to a given `Type` object belonging to the OpenThread instance.

For example, `Get

<MeshForwarder

>()` returns a reference to the `MeshForwarder` object of the instance.

Note that any `Type` for which the `Get

<Type

>` is defined MUST be uniquely accessible from the OpenThread

`Instance` through the member variable property hierarchy.

Protected Methods

void GetProvider<InstanceGetProvider> ()

Defined at line 96 of file ../../third_party/openthread/src/core/common/locator.hpp