libbio
Loading...
Searching...
No Matches
chemical/macro/Macros.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
24#include "ConstructorMacros.h"
25#include "ExcitationMacros.h"
28
33#define BIO_GET_REQUIRED_CLASS_METHODS_FOR_chemical() \
34 BIO_GET_REQUIRED_CLASS_METHODS_FOR_physical(), \
35 ( \
36 virtual bool RegisterProperties(const ::bio::Properties& properties), \
37 RegisterProperties(properties) \
38 ), \
39 ( \
40 virtual ::bio::Properties GetProperties() const, \
41 GetProperties() \
42 ), \
43 ( \
44 template< typename AS > operator AS(), \
45 template As< AS >() \
46 ), \
47 ( \
48 virtual ::bio::Pointer< const ::bio::log::Writer > AsLogWriter() const,\
49 AsLogWriter() \
50 ), \
51 ( \
52 BIO_SINGLE_ARG(virtual void Log( \
53 ::bio::LogLevel level, \
54 const char *format, \
55 va_list args \
56 ) const), \
57 Log(level, format, args) \
58 )
59
60
65#define BIO_GET_OPTIONAL_CLASS_METHODS_FOR_chemical() \
66 BIO_GET_OPTIONAL_CLASS_METHODS_FOR_physical(), \
67 ( \
68 virtual ::bio::Code Attenuate( \
69 ::bio::Pointer< const ::bio::physical::Wave > other), \
70 Attenuate(other) \
71 ), \
72 ( \
73 virtual ::bio::Code Disattenuate( \
74 ::bio::Pointer< const ::bio::physical::Wave > other), \
75 Disattenuate(other) \
76 )
77
82#define BIO_CHEMICAL_BOND_TYPE_FUNCTION_BODY(functionName) \
83BIO_ID_FUNCTION_BODY( \
84 functionName, \
85 ::bio::BondTypePerspective::Instance(), \
86 ::bio::BondType)
87
91#define BIO_DIFFUSION_TIME_FUNCTION_BODY(functionName) \
92BIO_ID_FUNCTION_BODY( \
93 functionName, \
94 ::bio::DiffusionTimePerspective::Instance(), \
95 ::bio::DiffusionTime)
96
100#define BIO_DIFFUSION_EFFORT_FUNCTION_BODY(functionName) \
101BIO_ID_FUNCTION_BODY( \
102 functionName, \
103 ::bio::DiffusionEffortPerspective::Instance(), \
104 ::bio::DiffusionEffort)