dasmig-core 1.2.0
Shared random engine, distributions and data tiers for the dasmig generator libraries
Loading...
Searching...
No Matches
dasmig::core::embedded_file Struct Reference

A data file compiled into the program. More...

#include <resources.hpp>

Public Member Functions

std::string text () const
 The whole content.
 

Public Attributes

std::string_view path
 Path below resources/, e.g. lite/biodata.tsv.
 
std::span< const std::string_view > chunks
 The content, in order.
 

Detailed Description

A data file compiled into the program.

Generated headers (scripts/embed.py) define arrays of these, so a build without a filesystem (WebAssembly) still has its data. The content is split into chunks because compilers limit the size of one string literal (MSVC: about 64 KB).

Definition at line 42 of file resources.hpp.

Member Function Documentation

◆ text()

std::string dasmig::core::embedded_file::text ( ) const
inline

The whole content.

Returns
The chunks joined.

Definition at line 49 of file resources.hpp.

Member Data Documentation

◆ chunks

std::span<const std::string_view> dasmig::core::embedded_file::chunks

The content, in order.

Definition at line 45 of file resources.hpp.

◆ path

std::string_view dasmig::core::embedded_file::path

Path below resources/, e.g. lite/biodata.tsv.

Definition at line 44 of file resources.hpp.


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