AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
Plugin.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/IO/APath.h>
   16
   17#ifdef AUI_STATIC
   18#ifdef _AUI_PLUGIN_ENTRY_N
   19#define AUI_PLUGIN_ENTRY struct _AUI_PLUGIN_ENTRY_N{ _AUI_PLUGIN_ENTRY_N() noexcept; } _AUI_PLUGIN_ENTRY_N ## v; _AUI_PLUGIN_ENTRY_N :: _AUI_PLUGIN_ENTRY_N () noexcept
   20#else
   21#define AUI_PLUGIN_ENTRY struct fail { fail(); static_assert(false, "usage of AUI_PLUGIN_ENTRY without PLUGIN flag in AUI_MODULE"); }; fail::fail()
   22#endif
   23#else
   24#define AUI_PLUGIN_ENTRY extern "C" AUI_EXPORT void aui_plugin_init()
   25#endif
   26
   27class AString;
   28
   29namespace aui
   30{
   36    API_AUI_CORE void importPlugin(const AString& name);
   37
   43    API_AUI_CORE void importPluginPath(const APath& path);
   44};
An add-on to AString with functions for working with the path.
Definition APath.h:128
Represents a Unicode character string.
Definition AString.h:38
API_AUI_CORE void importPluginPath(const APath &path)
imports plugin by it's path.
API_AUI_CORE void importPlugin(const AString &name)
imports plugin by it's name.