|
NSUNI/NSLAR Library a250670
|
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. | |
| 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.
| using nnl::collection::CollectionView = std::vector<BufferView> |
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.
|
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.
| asset_collection | The Collection object to be converted. |
| 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.
| buffer | The binary data to be processed. |
| 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.
| buffer | The binary data to be processed. |
| 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.
| buffer | The data to be tested. |