acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_app_core.h
1// Offloading apex(TBS) from deep stack stuff 2022-02-22 by camilo at 07:17 <3ThomasBorregaardSorensen!!
2#pragma once
3
4
5typedef i32_bool DEFER_INIT();
6typedef DEFER_INIT * PFN_DEFER_INIT;
7typedef i32_bool DEFER_TERM();
8typedef DEFER_TERM * PFN_DEFER_TERM;
9
10
11class node_data_exchange;
12
13
14class raw_fail {};
15
16
17// ATTENTION
18// apex_apex class should be instantiated before any other ca2 framework
19// class instantiation or any other ca2 framework function call.
20// It should be maintained allocated while process is running.
21// Not even aaa_primitive_new/delete/strings/ids can be used after it goes out of scope.
22
23
24//
25//
26//class main_runner_data
27//{
28//public:
29// void * m_p;
30//#ifdef WINDOWS
31// HINSTANCE m_hinstance;
32//#endif
33//
34//};
35//typedef ::i32 MAIN_RUNNER(main_runner_data * pmainrunnerdata);
36//typedef MAIN_RUNNER * LPFN_MAIN_RUNNER;
37
38#include "apex_main_data.h"
39
40
41#define APP_CORE_MAXIMUM_STATUS_COUNT 100
42
43
44
45class CLASS_DECL_ACME app_core :
46 virtual public ::apex_main_data
47{
48public:
49
50
51 //string m_strCommandLine;
52 string m_strProgName;
53 PFN_DEFER_TERM m_pfnDeferTerm;
54 ::duration m_durationStart;
55 ::duration m_durationAfterApplicationFirstRequest;
56 //::apex::system * system();
57 //::pointer<apex_main_data> m_pmaindata;
58 ::pointer<::acme::library> m_plibrary;
59 ::e_status m_estatusa[APP_CORE_MAXIMUM_STATUS_COUNT];
60 ::i32 m_iStatusCount;
61 ::i32 m_iTotalStatusCount;
62
63
64 //app_core(apex_main_data * pdata);
65 app_core();
66 ~app_core();
67
68 bool on_result(const ::e_status & estatus);
69
70 //static ::u32 WINAPI MAIN(void * pvoid);
71
72 //bool system_beg();
73
74 //bool system_init();
75
76 void system_proc();
77
78 bool has_apex_application_factory() const;
79
80 virtual void system_init();
81
82 virtual void system_prep();
83
84 //virtual void system_main();
85
86 //virtual void system_call();
87
88 string get_command_line();
89
90 void system_end();
91
92 ::pointer<::platform::application>new_app();
93 ::pointer<::platform::application>new_app(const ::scoped_string & scopedstrAppId);
94
95
96 // ::pointer<::apex::application>get_new_application(::object* pparticle);
97 // ::pointer<::apex::application>get_new_application(::object* pparticle, const ::scoped_string & scopedstrAppId);
98
99 virtual void initialize_application(::platform::application * papp, ::object* pparticle);
100
101
102};
103
104
105//
106//typedef bool FN_APEX_APP_CORE(app_core * pappcore);
107//
108//typedef FN_APEX_APP_CORE * PFN_APEX_APP_CORE;
109
110//CLASS_DECL_ACME long apex_apex(system * pmaindata);
111
112//CLASS_DECL_ACME bool node_fill(system * pappcore);
113
114//CLASS_DECL_APEX ::i32 apex_entry_point(HINSTANCE hinstance, HINSTANCE hPrevInstance, char_pointer pCmdLine, ::i32 nCmdShow, PFN_NEW_APEX_APPLICATION pfnNewAuraApplication = nullptr, PFN_NEW_APEX_LIBRARY pfnNewLibrary = nullptr);
115
116//CLASS_DECL_APEX ::i32 apex_entry_point(::i32 argc, char_pointer argv[], char_pointer pszCommandLin, PFN_NEW_APEX_APPLICATION pfnNewAuraApplication = nullptr, PFN_NEW_APEX_LIBRARY pfnNewLibrary = nullptr);
117
118
119
120//class CLASS_DECL_ACME apex_level
121//{
122//public:
123//
124//
125// enum enum_level
126// {
127// e_level_none = 0,
128// e_level_acme = 1,
129// e_level_apex = 2,
130// e_level_aqua = 3,
131// e_level_aura = 4,
132// e_level_axis = 5,
133// e_level_base = 6,
134// e_level_bred = 7,
135// e_level_core = 8,
136// };
137//
138//
139// enum_level m_elevel;
140// PFN_DEFER_INIT m_pfnDeferInit;
141// apex_level * m_plevelNext;
142//
143//
144// apex_level(enum_level elevel, PFN_DEFER_INIT pfnDeferInit);
145//
146// static apex_level * get_maximum_level();
147//
148// static apex_level * find_level(PFN_DEFER_INIT pfnDeferInit);
149//
150// static bool defer_init();
151//
152// static bool defer_init(PFN_DEFER_INIT pfnDeferInit);
153//
154//
155//};
156
157
158
Definition e_status.h:30
Definition application.h:64
Definition aaa_app_core.h:14