λ61
Loading...
Searching...
No Matches
PseudoKeywords.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 Tetex7
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18//
19// Created by tete on 06/09/2025.
20//
21#pragma once
22
23#ifndef L61_PSEUDOKEYWORDS_HPP
24#define L61_PSEUDOKEYWORDS_HPP
25
26// Oh, yes this is an abomination, but I like Java and I like to know what am I reading and its purpose
27// So the pseudo keywords stay
28
29// Why does this macro exist to help with fast writing of interfaces
30// Which are tedious to make when they're all pure virtual if you've done C++ for a long enough time you know
31// And the abstract macros or for at a glance reading
32// and This is very much so inspired by how COM headers Are written and as well Qt headers
33
34// Yes this is force include
35// yes when you use my api you're going to have to tell your compiler to force include this
36
37// A rule within this header file of pseudo keywords is that
38// all pseudo keywords must distill down to simple real keywords no preprocessor magic
39
44#define l61_interface struct
45
52#define l61_interface_call(access_level, sig) access_level: virtual sig = 0
53
58#define l61_interface_deconstructor(type) public: virtual ~type() = default
59
63#define l61_abstract_class class
68#define l61_abstract_call(sig) virtual sig = 0
69
75#define l61_abstract_destructor(type) public: virtual ~type() = default
76
77#define l61_unused [[maybe_unused]]
78
79#define C_CALL extern "C"
80#ifndef LEX61_SYM_LOOKUP_COMPAT
81# define LEX61_SYM_LOOKUP_COMPAT extern "C"
82#endif
83
84
85namespace l61
86{
87 using c_signal_t = int;
88}
89
90#endif
Definition Object.hpp:34
int c_signal_t
Definition baseTypes.hpp:27