Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/design-patterns-in-modern-cpp
/ OffState
Method
OffState
Behavioral/State/classic.cpp:31–34 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
29
struct OffState : State
30
{
31
OffState()
32
{
33
cout <<
"Light turned off\n"
;
34
}
35
36
void on(LightSwitch* ls) override;
37
};
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected