Diarkis C++Client Library API Document
Component.h
Go to the documentation of this file.
1 // © 2019-2024 Diarkis Inc. All rights reserved.
2 
3 #pragma once
4 
5 #include <thread>
6 #include <chrono>
7 
8 #include "diarkis/common.h"
10 #include "diarkis/system/Event.h"
11 
12 #if defined(DIARKIS_PLATFORM_NINTENDO_SWITCH)
13 #include <pthread.h>
14 #endif // DIARKIS_PLATFORM_NINTENDO_SWITCH
15 
16 using namespace Diarkis;
17 
18 // ADD NAMESPACE NAME TAG
19 namespace Diarkis
20 {
21 
29 {
30  public:
43  virtual std::shared_ptr<IDiarkisEvent<void*>> GetSchedulerAddNotifyEvent() = 0;
44 
51  virtual void Update() = 0;
58 #ifndef LIBWRAPPER
59  [[deprecated("This method is deprecated. You can know when you have to process an event by using GetSchedulerAddNotifyEvent().")]]
60 #endif
61  virtual bool WaitCondition(std::chrono::milliseconds maxWait) = 0;
62 
63  protected:
64 
65 };
66 
67 }
68 // ADD NAMESPACE } TAG
Diarkis::IDiarkisComponent::Update
virtual void Update()=0
Called on every runtime frame.
Logger.h
Diarkis
Definition: commands.h:9
Event.h
common.h
Diarkis::IDiarkisComponent::WaitCondition
virtual bool WaitCondition(std::chrono::milliseconds maxWait)=0
Called on every runtime frame.
Diarkis::IDiarkisComponent::GetSchedulerAddNotifyEvent
virtual std::shared_ptr< IDiarkisEvent< void * > > GetSchedulerAddNotifyEvent()=0
An event handler when some event has been added to the scheduler.
Diarkis::IDiarkisComponent
Implement this interface to be able to register to a scheduler for periodic update.
Definition: Component.h:28