Loading...
Searching...
No Matches
Lifecycle.h
Go to the documentation of this file.
1//
2// Lifecycle.h
3//
4
5#ifndef MALENA_LIFECYCLE_H
6#define MALENA_LIFECYCLE_H
7
8#pragma once
9
11
12namespace ml
13{
73 {
74 public:
82 virtual void onInit() {}
83
90 virtual void onReady() {}
91
92 virtual ~Lifecycle() = default;
93 };
94
95} // namespace ml
96
97#endif // MALENA_LIFECYCLE_H
Trait that adds one-time initialization lifecycle hooks to any class.
Definition Lifecycle.h:73
virtual void onInit()
Called once after construction, before the first frame.
Definition Lifecycle.h:82
virtual ~Lifecycle()=default
virtual void onReady()
Called once after onInit(), when all components are registered.
Definition Lifecycle.h:90
#define MALENA_API
Definition Component.h:22