Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::core::LibraryInfo Struct Reference

What an Aegis2D library tells about itself, from its C entry point. More...

#include <aegis2d/core/shared_library.hpp>

Public Attributes

std::uint32_t api_version = 0
 library_api_version the library was built with.
 
const char * name = nullptr
 Name of the library, a static string; may be null.
 

Detailed Description

What an Aegis2D library tells about itself, from its C entry point.

Plain C data, so the engine reads it whatever compiler built the library. The library exports a function named library_entry, with C linkage, that returns it:

extern "C" MY_PLUGIN_EXPORT const aegis2d::core::LibraryInfo* aegis2d_library_entry() {
static constexpr aegis2d::core::LibraryInfo info{
return &info;
}
constexpr std::uint32_t library_api_version
Version of the interface between the engine and the libraries it loads.
Definition shared_library.hpp:19
What an Aegis2D library tells about itself, from its C entry point.
Definition shared_library.hpp:36
std::uint32_t api_version
library_api_version the library was built with.
Definition shared_library.hpp:38

MY_PLUGIN_EXPORT exports the function: __declspec(dllexport) on Windows, e.g. from CMake's generate_export_header().

Member Data Documentation

◆ api_version

std::uint32_t aegis2d::core::LibraryInfo::api_version = 0

library_api_version the library was built with.

◆ name

const char* aegis2d::core::LibraryInfo::name = nullptr

Name of the library, a static string; may be null.


The documentation for this struct was generated from the following file: