MCPcopy Create free account
hub / github.com/Forairaaaaa/mooncake / MyApp

Class MyApp

example/basic_demo.cpp:19–44  ·  view source on GitHub ↗

派生一个 App

Source from the content-addressed store, hash-verified

17
18// 派生一个 App
19class MyApp : public AppAbility {
20public:
21 MyApp()
22 {
23 // 配置 App 信息
24 setAppInfo().name = "凤爪";
25
26 printf("[%s] on construct\n", getAppInfo().name.c_str());
27 }
28
29 // 重载生命周期回调函数
30 void onOpen() override
31 {
32 printf("[%s] on open\n", getAppInfo().name.c_str());
33 }
34 void onRunning() override
35 {
36 printf("[%s] on running\n", getAppInfo().name.c_str());
37 }
38
39 // 省略
40 // void onCreate() override {}
41 // void onSleeping() override {}
42 // void onClose() override {}
43 // void onDestroy() override {}
44};
45
46int main()
47{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected