wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
schema_catalog.hpp File Reference

The runtime schema source of the generic ClientDB engine: table name + client version in, a wowlib::db::Column span out — no generated record types involved. More...

#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <span>
#include <string_view>
#include <vector>
#include <wowlib/core/client_version.hpp>
#include <wowlib/core/error.hpp>
#include <wowlib/db/schema.hpp>
Include dependency graph for schema_catalog.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wowlib::db::TableSchema
 One resolved (table, client version) schema: what SchemaCatalog::lookup hands the engine. More...
class  wowlib::db::SchemaCatalog
 The parsed, materialized form of one WDBS schema blob. More...

Namespaces

namespace  wowlib
namespace  wowlib::db

Macros

#define WOWLIB_DB_SCHEMA_EMBEDDED   1
#define WOWLIB_DB_SCHEMA_RUNTIME   1

Detailed Description

The runtime schema source of the generic ClientDB engine: table name + client version in, a wowlib::db::Column span out — no generated record types involved.

A catalog is built from one WDBS blob (schema_blob.hpp): either the copy baked into the library (#embed, wowlib::db::SchemaCatalog::embedded — present unless the build configured WOWLIB_DB_SCHEMA=runtime) or one loaded from disk at runtime (wowlib::db::SchemaCatalog::fromBlobFile — for tools that track WoWDBDefs faster than they rebuild wowlib). Column names point into the catalog's blob bytes, so a schema span is valid for the catalog's lifetime; the embedded catalog lives forever.

Version resolution is BY ERA, mirroring how the whole library targets clients: the blob carries the era table (the last-minor-of-major releases), a client version snaps to the era sharing its major, and each schema range declares the eras it covers as a bitmask.

Definition in file schema_catalog.hpp.

Macro Definition Documentation

◆ WOWLIB_DB_SCHEMA_EMBEDDED

#define WOWLIB_DB_SCHEMA_EMBEDDED   1

Definition at line 33 of file schema_catalog.hpp.

◆ WOWLIB_DB_SCHEMA_RUNTIME

#define WOWLIB_DB_SCHEMA_RUNTIME   1

Definition at line 36 of file schema_catalog.hpp.