Debian Codegraph @

modules/lsp-runtime-lib/include/lsp-plug.in/fmt/java/wrappers.h

raw
1 /*
2 * Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3 * (C) 2020 Vladimir Sadovnikov <[email protected]>
4 *
5 * This file is part of lsp-runtime-lib
6 * Created on: 6 сент. 2019 г.
7 *
8 * lsp-runtime-lib is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * lsp-runtime-lib 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 Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with lsp-runtime-lib. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #ifndef LSP_PLUG_IN_FMT_JAVA_WRAPPERS_H_
23 #define LSP_PLUG_IN_FMT_JAVA_WRAPPERS_H_
24
25 #include <lsp-plug.in/runtime/version.h>
26 #include <lsp-plug.in/common/status.h>
27 #include <lsp-plug.in/fmt/java/const.h>
28 #include <lsp-plug.in/fmt/java/Object.h>
29
30 namespace lsp
31 {
32 namespace java
33 {
34 #define WRAPPER_DEF(name, type_t) \
35 class name: public Object \
36 { \
37 public: \
38 static const char *CLASS_NAME; \
39 \
40 protected: \
41 virtual status_t to_string_padded(LSPString *dst, size_t pad); \
42 \
43 public: \
44 explicit name(); \
45 virtual ~name(); \
46 \
47 public: \
48 type_t value() const; \
49 status_t get_value(type_t *dst) const; \
50 }
51
52 WRAPPER_DEF(Byte, byte_t);
53 WRAPPER_DEF(Short, short_t);
54 WRAPPER_DEF(Integer, int_t);
55 WRAPPER_DEF(Long, long_t);
56 WRAPPER_DEF(Double, double_t);
57 WRAPPER_DEF(Float, float_t);
58 WRAPPER_DEF(Boolean, bool_t);
59 WRAPPER_DEF(Character, char_t);
60
61 #undef WRAPPER_DEF
62 }
63 }
64
65
66 #endif /* LSP_PLUG_IN_FMT_JAVA_WRAPPERS_H_ */