Develop Biology
The language of life
SiteMacros.h
Go to the documentation of this file.
1
/*
2
* This file is a part of the Biology project by eons LLC.
3
* Biology (aka Develop Biology) is a framework for approaching software
4
* development from a natural sciences perspective.
5
*
6
* Copyright (C) 2022 Séon O'Shannon & eons LLC
7
*
8
* This program is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU Affero General Public License as
10
* published by the Free Software Foundation, either version 3 of the
11
* License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Affero General Public License for more details.
17
*
18
* You should have received a copy of the GNU Affero General Public License
19
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20
*/
21
22
#pragma once
23
27
#define BIO_SITE_FUNCTION(perspective, site, type, function, typeTuple, argTuple)\
28
bool g_##site##Registered = \
29
::bio::perspective::Instance().AssociateType( \
30
g_##site, \
31
( \
32
new BIO_EXCITATION_CLASS( \
33
::bio::chemical::LinearMotif< type >, \
34
type, \
35
BIO_EXPAND_TUPLE typeTuple \
36
)( \
37
&::bio::chemical::LinearMotif< type >::function, \
38
BIO_EXPAND_TUPLE argTuple \
39
) \
40
)->AsWave() \
41
);
42
49
#define BIO_LOCALIZATION_SITE_FUNCTION_BODY(functionName, toExtract) \
50
BIO_ID_FUNCTION_BODY( \
51
functionName##LocalizationSite, \
52
::bio::LocalizationSitePerspective::Instance(), \
53
::bio::Site) \
54
BIO_SITE_FUNCTION(LocalizationSitePerspective, functionName##LocalizationSite, toExtract, GetByNameImplementation, (Name), (NULL))
55
62
#define BIO_INSERTION_SITE_FUNCTION_BODY(functionName, toInsert) \
63
BIO_ID_FUNCTION_BODY( \
64
functionName##InsertionSite, \
65
::bio::InsertionSitePerspective::Instance(), \
66
::bio::Site) \
67
BIO_SITE_FUNCTION(InsertionSitePerspective, functionName##InsertionSite, toInsert, AddImplementation, (toInsert), (NULL))
68
72
#define BIO_SITE(functionName) \
73
namespace site { \
74
Site functionName(); \
75
}
76
80
#define BIO_SITE_FUNCTION_BODY(functionName, type) \
81
namespace site { \
82
BIO_LOCALIZATION_SITE_FUNCTION_BODY(functionName, type) \
83
BIO_INSERTION_SITE_FUNCTION_BODY(functionName, type) \
84
}
inc
bio
genetic
macros
SiteMacros.h
Generated by
1.9.4