NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches

Typedefs

using nnl::collection::Collection = std::vector<Buffer>
 A container for related but distinct assets.
using nnl::collection::CollectionView = std::vector<BufferView>
 A non-owning view of an asset collection.

Functions

bool nnl::collection::IsOfType (BufferView buffer)
 Tests if the provided file is an asset collection.
Collection nnl::collection::Import (BufferView buffer)
 Parses a binary file and converts it into a Collection object.
CollectionView nnl::collection::ImportView (BufferView buffer)
 Parses a binary file and converts it into a CollectionView object.
Buffer nnl::collection::Export (const Collection &asset_collection)
 Converts an asset collection to a binary file representation.

Detailed Description

Typedef Documentation

◆ Collection

using nnl::collection::Collection = std::vector<Buffer>

A container for related but distinct assets.

This container often groups complete, logically related but distinct assets (e.g., a 3D map and its 3D props). It's typically nested inside a DigEntry container.

See also
nnl::collection::Import
nnl::collection::Export
nnl::dig_entry::DigEntry
nnl::collection::CollectionView

◆ CollectionView

A non-owning view of an asset collection.

This type is almost identical to Collection and represents the same container but allows for access to its entries via references to the source Buffer. It's most suitable when no modifications to the data are expected.

See also
nnl::collection::Collection
nnl::collection::ImportView

Function Documentation

◆ Export()

Buffer nnl::collection::Export ( const Collection & asset_collection)
nodiscard

Converts an asset collection to a binary file representation.

This function takes a Collection object and converts it into a Buffer, which represents the binary format of the container.

Parameters
asset_collectionThe Collection object to be converted.
Returns
A Buffer containing the binary representation of the container.

◆ Import()

Collection nnl::collection::Import ( BufferView buffer)

Parses a binary file and converts it into a Collection object.

This function takes a binary representation of an asset collection, parses its contents, and converts them into a Collection object for easier access and modification.

Parameters
bufferThe binary data to be processed.
Returns
A Collection object consisting of file buffers.
See also
nnl::collection::IsOfType
nnl::collection::ImportView
nnl::collection::Export

◆ ImportView()

CollectionView nnl::collection::ImportView ( BufferView buffer)

Parses a binary file and converts it into a CollectionView object.

CollectionView does not store copies of file buffers but stores references to the original data.

Parameters
bufferThe binary data to be processed.
Returns
A CollectionView object representing the converted data.
See also
nnl::collection::Collection

◆ IsOfType()

bool nnl::collection::IsOfType ( BufferView buffer)

Tests if the provided file is an asset collection.

This function takes data representing a file and checks whether it corresponds to the in-game asset collection format.

Parameters
bufferThe data to be tested.
Returns
true if the file is identified as an asset collection
See also
nnl::collection::Import
nnl::collection::ImportView