acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
factory_function.h
1// Created by camilo on 2022-12-03 16:02 <3ThomasBorregaardSorensen!!
2#pragma once
3
4
5typedef void FACTORY_FUNCTION(::factory::factory*);
6
7
8class CLASS_DECL_ACME factory_function
9{
10public:
11
12
13 const_char_pointer m_pszName;
14 FACTORY_FUNCTION* m_pfnFactory;
15 factory_function* m_pfactoryfunctionNext;
16
17
18 static factory_function* g_pfactoryfunctionNext;
19
20
21 factory_function(const_char_pointer pszName, FACTORY_FUNCTION* pfnFactory);
22
23 static FACTORY_FUNCTION* get(const ::scoped_string & scopedstrName);
24
25};
26
27
28#define _REFERENCE_FACTORY(name) \
29void TOKEN_CONCATENATE(name, _factory)(::factory::factory * pfactory); \
30::factory_function TOKEN_CONCATENATE(g_set_factory_function_, name) = {MAKE_STRING(name), &::TOKEN_CONCATENATE(name, _factory) };
31
32
33#define REFERENCE_FACTORY(name) \
34__FACTORY_IMPORT void TOKEN_CONCATENATE(name, _factory)(::factory::factory * pfactory); \
35::factory_function TOKEN_CONCATENATE(g_set_factory_function_, name) = {MAKE_STRING(name), &::TOKEN_CONCATENATE(name, _factory) };
36
37
38
Definition factory.h:201