Debian Codegraph @

modules/lsp-runtime-lib/include/lsp-plug.in/fmt/java/String.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: 29 авг. 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_JAVASTRING_H_
23 #define LSP_PLUG_IN_FMT_JAVA_JAVASTRING_H_
24
25 #include <lsp-plug.in/runtime/version.h>
26 #include <lsp-plug.in/runtime/LSPString.h>
27 #include <lsp-plug.in/fmt/java/Object.h>
28
29 namespace lsp
30 {
31 namespace java
32 {
33 /**
34 * String implementation of Java object
35 */
36 class String: public Object
37 {
38 public:
39 static const char *CLASS_NAME;
40
41 private:
42 String & operator = (const String &);
43
44 private:
45 LSPString sString;
46
47 protected:
48 virtual status_t to_string_padded(LSPString *dst, size_t pad);
49
50 public:
51 explicit String();
52 virtual ~String();
53
54 public:
55 inline LSPString *string() { return &sString; }
56 inline const LSPString *string() const { return &sString; }
57
58 inline operator LSPString &() { return sString; }
59 inline operator LSPString *() { return &sString; }
60
61 inline operator const LSPString &() const { return sString; }
62 inline operator const LSPString *() const { return &sString; }
63 };
64
65 } /* namespace java */
66 } /* namespace lsp */
67
68 #endif /* LSP_PLUG_IN_FMT_JAVA_JAVASTRING_H_ */