AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ABuiltinFiles.h
    1/*
    2 * AUI Framework - Declarative UI toolkit for modern C++20
    3 * Copyright (C) 2020-2025 Alex2772 and Contributors
    4 *
    5 * SPDX-License-Identifier: MPL-2.0
    6 *
    7 * This Source Code Form is subject to the terms of the Mozilla Public
    8 * License, v. 2.0. If a copy of the MPL was not distributed with this
    9 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
   10 */
   11
   12#pragma once
   13
   14#include "AUI/Core.h"
   15#include "AUI/Common/AByteBufferView.h"
   16#include "AUI/Common/AMap.h"
   17#include "AUI/Common/SharedPtr.h"
   18#include "AUI/IO/IInputStream.h"
   19#include <optional>
   20
   21class AString;
   22
   23class API_AUI_CORE ABuiltinFiles {
   24private:
   26
   27    static ABuiltinFiles& inst();
   28
   29    ABuiltinFiles() = default;
   30
   31public:
   32    static void registerAsset(std::string_view path, const unsigned char* data, size_t size,
   33                              std::string_view programModule = AUI_PP_STRINGIZE(AUI_MODULE_NAME));
   34
   35    static _unique<IInputStream> open(const AString& file);
   36
   37    static bool contains(const AString& file);
   38};
A std::map with AUI extensions.
Definition AMap.h:218
Represents a Unicode character string.
Definition AString.h:38
#define AUI_PP_STRINGIZE(...)
Expands and stringifies the only argument.
Definition APreprocessor.h:28