ADTF
Loading...
Searching...
No Matches
adtf_runtime.h
Go to the documentation of this file.
1
7#pragma once
8
11
12namespace adtf
13{
14namespace base
15{
16namespace ant
17{
18
43} // namespace ant
44
48class cADTFRuntime : public ucom::catwo::object<ucom::cRuntime, IADTFRuntime, ucom::spider::IRuntimeStartup>
49{
50 A_UTILS_D(cADTFRuntime)
51
52public:
59 cADTFRuntime(const adtf::util::cCommandLine& oCommandline);
60
61 ~cADTFRuntime() override;
62
63 // called with tADTFRunLevel range
64 tResult SetRunLevel(int8_t i8RunlevelToChangeTo, bool bWait = true) override;
65
66 // returns values within tADTFRunLevel range
67 int8_t GetRunLevel() const override;
68
69 tResult SetMicroRunLevel(tADTFMicroRunLevel nRunlevelToChangeTo, bool bWait = true) override;
70
71 tADTFMicroRunLevel GetMicroRunLevel() const override;
72
73 tResult CreateInstance(const char* strCID,
75 const char* strNameOfObject = "") const override;
76
77 // called with tADTFRunLevel range
78 tResult RegisterObject(const ucom::ant::iobject_ptr<ucom::ant::IObject>& pObject,
79 const char* strNameOID,
80 int8_t nRunLevel,
81 uint32_t ui32Flags = 0) override;
82
83 // called with tADTFRunLevel range
84 tResult RegisterPlugin(const char* strUrl,
85 int8_t nRunLevel,
87 uint32_t ui32Flags = 0) override;
88
89 bool StartupCompleted() const override;
90
108 tResult Exec(int8_t i8FirstRunlevelToSet, std::function<void()> fnStartup);
117 tResult Exec(int8_t i8FirstRunlevelToSet, std::function<void()> fnStartup, bool bContinueInCaseOfError);
118 tResult Exec(int8_t i8FirstRunlevelToSet);
119
120 tResult ExecMicro(tADTFMicroRunLevel nFirstMicroRunlevelToSet,
121 std::function<void()> fnStartup,
122 bool bContinueInCaseOfError);
123
124protected:
125 // this is called from the base class with our micro runlevel identifiers.
126 const char* GetRunLevelString(int8_t i8Runlevel) const override;
127};
128
132
133} // namespace base
134} // namespace adtf
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition adtf_runtime.h:49
ucom::catwo::object< ucom::cRuntime, IADTFRuntime, ucom::spider::IRuntimeStartup > base_type
base type
Definition adtf_runtime.h:54
cADTFRuntime(const adtf::util::cCommandLine &oCommandline)
tResult Exec(int8_t i8FirstRunlevelToSet, std::function< void()> fnStartup, bool bContinueInCaseOfError)
tResult Exec(int8_t i8FirstRunlevelToSet, std::function< void()> fnStartup)
@ RL_Shutdown
The system is shut down.
Definition runtime_intf.h:117
@ RL_Internal
Invalid run level that signals unmanaged modules.
Definition runtime_intf.h:120
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object.h:397
Namespace for all functionality of the ADTF Base SDK provided since v3.0.
Definition adtf_class_version.h:16
tADTFRunLevel
Definition adtf_runtime.h:23
@ RL_Shutdown
The system is shut down.
Definition adtf_runtime.h:25
@ RL_Session
The session level.
Definition adtf_runtime.h:29
@ RL_Max
maximum level that can be reached
Definition adtf_runtime.h:37
@ RL_StreamingGraph
The Streaminggraph level.
Definition adtf_runtime.h:31
@ RL_System
The system level.
Definition adtf_runtime.h:27
@ RL_Running
The Running level.
Definition adtf_runtime.h:35
@ RL_Internal
Definition adtf_runtime.h:41
@ RL_FilterGraph
The Filtergraph level.
Definition adtf_runtime.h:33
Namespace for the ADTF Base SDK.
Definition adtf_base_type_traits.h:13
cADTFRuntime cRuntime
Type definition for the Default Runtime of ADTF.
Definition adtf_runtime.h:131
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14