libbio
Loading...
Searching...
No Matches
physical/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
25//@formatter:off
26
28#include "ClassMethodMacros.h"
30
35#define BIO_GET_REQUIRED_CLASS_METHODS_FOR_physical() \
36 ( \
37 virtual ::bio::Pointer< ::bio::physical::Wave > Clone() const, \
38 Clone() \
39 ), \
40 ( \
41 ::bio::Pointer< ::bio::physical::Wave > AsWave(), \
42 AsWave() \
43 ), \
44 ( \
45 ::bio::Pointer< const ::bio::chemical::Atom > AsAtom() const, \
46 AsAtom() \
47 ), \
48 ( \
49 ::bio::Pointer< ::bio::chemical::Atom > AsAtom(), \
50 AsAtom() \
51 ), \
52 ( \
53 ::bio::Pointer< const ::bio::physical::Wave > AsWave() const, \
54 AsWave() \
55 ), \
56 ( \
57 operator ::bio::Pointer< ::bio::physical::Wave >(), \
58 operator ::bio::Pointer< ::bio::physical::Wave >() \
59 )
60
65#define BIO_GET_OPTIONAL_CLASS_METHODS_FOR_physical() \
66 ( \
67 virtual ::bio::Pointer< ::bio::physical::Wave > Modulate( \
68 ::bio::Pointer< ::bio::physical::Wave > signal), \
69 Modulate(signal) \
70 ), \
71 ( \
72 virtual ::bio::Pointer< ::bio::physical::Wave > Demodulate(), \
73 Demodulate() \
74 ), \
75 ( \
76 virtual ::bio::Pointer< const ::bio::physical::Wave > Demodulate() const,\
77 Demodulate() \
78 ), \
79 ( \
80 BIO_SINGLE_ARG(virtual ::bio::Pointer< ::bio::physical::Wave > Superpose(\
81 const ::bio::physical::ConstWaves& displacement, \
82 ::bio::Pointer< ::bio::physical::Interference > pattern)), \
83 BIO_SINGLE_ARG(Superpose(displacement, pattern)) \
84 ), \
85 ( \
86 BIO_SINGLE_ARG(virtual bool Superpose( \
87 ::bio::Pointer< const ::bio::physical::Wave > displacement, \
88 ::bio::Pointer< ::bio::physical::Interference > pattern)), \
89 BIO_SINGLE_ARG(Superpose(displacement, pattern)) \
90 )
91
92
98#define BIO_CODE_FUNCTION_BODY(functionName) \
99BIO_ID_FUNCTION_BODY( \
100 functionName, \
101 ::bio::CodePerspective::Instance(), \
102 ::bio::Code)
103
109#define BIO_STATE_FUNCTION_BODY(functionName) \
110BIO_ID_FUNCTION_BODY( \
111 functionName, \
112 ::bio::StatePerspective::Instance(), \
113 ::bio::State)
114
115
121#define BIO_PROPERTY_FUNCTION_BODY(functionName) \
122BIO_ID_FUNCTION_BODY( \
123 functionName, \
124 ::bio::PropertyPerspective::Instance(), \
125 ::bio::Property)
126
132#define BIO_SYMMETRY_TYPE_FUNCTION_BODY(functionName) \
133BIO_ID_FUNCTION_BODY( \
134 functionName, \
135 ::bio::SymmetryTypePerspective::Instance(), \
136 ::bio::SymmetryType)
137
143#define BIO_FILTER_FUNCTION_BODY(functionName) \
144BIO_ID_FUNCTION_BODY( \
145 functionName, \
146 ::bio::FilterPerspective::Instance(), \
147 ::bio::Filter)
148
154#define BIO_SUPERPOSITION_FUNCTION_BODY(functionName) \
155BIO_ID_FUNCTION_BODY( \
156 functionName, \
157 ::bio::SuperpositionPerspective::Instance(), \
158 ::bio::Superposition)