Skip to content

Commit 2cc4cd8

Browse files
committed
comments
1 parent 82ef731 commit 2cc4cd8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/lighting-app/silabs/include/AppTaskImpl.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ template <typename Derived>
4242
class AppTaskImpl : public AppTask
4343
{
4444
public:
45+
/**
46+
* Public API: each method dispatches to Derived::*Impl() via CRTP.
47+
* Derived must implement AppInitImpl(); all others may override *Impl() to customize.
48+
* Static methods dispatch via GetAppTask().
49+
*/
4550
using Action_t = LightingManager::Action_t;
4651

4752
CHIP_ERROR AppInit() override
@@ -119,6 +124,10 @@ class AppTaskImpl : public AppTask
119124
}
120125

121126
protected:
127+
/**
128+
* AppTask overrides and static callbacks: forward to Derived::*Impl() via CRTP_THIS / CRTP_APP_TASK.
129+
* Override the corresponding *Impl() in Derived to customize.
130+
*/
122131
void OnLightActionInitiated(LightingManager::Action_t aAction, int32_t aActor, uint8_t * aValue) override
123132
{
124133
CRTP_THIS(Derived)->OnLightActionInitiatedImpl(aAction, aActor, aValue);
@@ -189,6 +198,9 @@ class AppTaskImpl : public AppTask
189198
private:
190199
friend Derived;
191200

201+
/**
202+
* Default *Impl() implementations: call through to AppTask. Override in Derived for custom behavior.
203+
*/
192204
CHIP_ERROR StartAppTaskImpl()
193205
{
194206
return AppTask::StartAppTask();

0 commit comments

Comments
 (0)