19template <
class ComponentClass>
32 I_ASSIGN(m_runtimeStatusCompPtr,
"RuntimeStatus",
"Application's runtime status",
false,
"RuntimeStatus");
33 I_ASSIGN_TO(m_runtimeStatusModelCompPtr, m_runtimeStatusCompPtr,
false);
82template <
class ComponentClass>
84 :m_statusObserver(*this)
91template <
class ComponentClass>
97template <
class ComponentClass>
103template <
class ComponentClass>
111template <
class ComponentClass>
114 BaseClass::OnComponentCreated();
116 if (m_runtimeStatusCompPtr.IsValid() && m_runtimeStatusModelCompPtr.IsValid()){
117 m_statusObserver.RegisterModel(m_runtimeStatusModelCompPtr.GetPtr(), MI_RUNTIME_STATUS);
122template <
class ComponentClass>
125 m_statusObserver.UnregisterAllModels();
127 BaseClass::OnComponentDestroyed();
133template <
class ComponentClass>
144template <
class ComponentClass>
145void TRuntimeStatusHanderCompWrap<ComponentClass>::RuntimeStatusObserver::OnModelChanged(
int modelId,
const istd::IChangeable::ChangeSet& changeSet)
149 if (modelId == MI_RUNTIME_STATUS){
150 switch (m_parent.m_runtimeStatusCompPtr->GetRuntimeStatus()){
152 m_parent.OnSystemStarting();
156 m_parent.OnSystemStarted();
160 m_parent.OnSystemShutdown();
Provider of the run-time status.
@ RS_SHUTDOWN
Process is in shutdown phase.
@ RS_STARTING
Process starting up.
@ RS_RUNNING
Process is running.
Wrapper for providing additional component life-cycle states based on the application's runtime statu...
virtual void OnComponentDestroyed() override
virtual void OnComponentCreated() override
virtual void OnSystemShutdown()
The method will be called before the event loop of the application is quit.
TRuntimeStatusHanderCompWrap()
RuntimeStatusObserver m_statusObserver
virtual void OnSystemStarted()
The method will be called after the application' initialization was completed.
virtual void OnSystemStarting()
The method will be called directly after the creating the event loop of the application.
Generic implementation of a data model changes notifier.
Common interface for model objects, that supports Model/Observer design pattern.
Set of change flags (its IDs).
This namespace contains basic implementations of standard primitives on the component level.