bsa/detail/common.hpp file

Namespaces

namespace bsa
namespace bsa::concepts
namespace bsa::components

Classes

struct bsa::doxygen_detail
A doxygen only, detail class.
class bsa::exception
The base exception type for all bsa exceptions.
class bsa::compression_error
Classifies errors generated during compression library operations.
struct bsa::concepts::stringable
Defines a type that can be used to construct std::string
class bsa::components::basic_byte_container
A basic byte storage container.
class bsa::components::byte_container
A byte storage container without compression support.
class bsa::components::compressed_byte_container
A byte storage container with compression support.
template<class T, bool RECURSE>
class bsa::components::hashmap
Establishes a basic mapping between a key and its associated files.
template<class U>
class bsa::components::hashmap::index_t
A proxy value used to facilitate the usage/chaining of hashmap::operator[] in an intuitive manner.
template<class Hash, hasher_t<Hash> Hasher>
class bsa::components::key
A generic key used to uniquely identify an object inside the virtual filesystem.

Enums

enum class compression_type { decompressed, compressed }
Indicates whether the operation should finish by compressing the data or not.
enum class copy_type { deep, shallow }
The copy method to use when reading from in-memory buffers.
enum class file_format { tes3, tes4, fo4 }
The file format for a given archive.

Functions

auto guess_file_format(std::filesystem::path a_path) -> std::optional<file_format>
Guesses the archive format for a given file.
auto guess_file_format(std::span<const std::byte> a_src) -> std::optional<file_format>
Guesses the archive format for a given file.
auto make_four_cc(std::string_view a_cc) -> std::uint32_t constexpr noexcept
Converts, at most, the first 4 characters of the given string into a 4 byte integer.