Infinity Engine v0.6.20
C++ API Documentation
Loading...
Searching...
No Matches
Infinity::Assets::AssetLoadInfo Struct Reference

Encapsulates the information required to load an asset in the Infinity engine. More...

#include <AssetLoadInfo.hpp>

Collaboration diagram for Infinity::Assets::AssetLoadInfo:
[legend]

Public Member Functions

 AssetLoadInfo (const Infinity::Types::TypeID &assetType, const std::string &corePath, const std::string &loadPrefix, const std::string &assetPath)
 Constructs an AssetLoadInfo with complete path specification.
 
 AssetLoadInfo (const Infinity::Types::TypeID &assetType, const std::string &assetPath)
 Constructs an AssetLoadInfo with simplified path specification.
 

Public Attributes

Infinity::Types::TypeID assetType
 The type identifier for the asset.
 
std::string corePath
 The base directory path where assets are stored.
 
std::string loadPrefix
 Additional path component prepended to the asset path.
 
std::string assetPath
 The relative path to the specific asset file being loaded.
 

Detailed Description

Encapsulates the information required to load an asset in the Infinity engine.

This structure stores the asset's type identifier along with path information that determines where and how the asset should be loaded from. It supports both full path specification with core path and load prefix, as well as simplified usage with just the asset path.

Note
The full path to an asset is typically constructed as: corePath + loadPrefix + assetPath

Constructor & Destructor Documentation

◆ AssetLoadInfo() [1/2]

Infinity::Assets::AssetLoadInfo::AssetLoadInfo ( const Infinity::Types::TypeID assetType,
const std::string &  corePath,
const std::string &  loadPrefix,
const std::string &  assetPath 
)

Constructs an AssetLoadInfo with complete path specification.

Creates an AssetLoadInfo with all path components explicitly defined, providing full control over asset location resolution.

Parameters
assetTypeThe type identifier for the asset being loaded
corePathThe base directory path where assets are stored
loadPrefixAdditional path component prepended to the asset path during loading
assetPathThe relative path to the specific asset file

◆ AssetLoadInfo() [2/2]

Infinity::Assets::AssetLoadInfo::AssetLoadInfo ( const Infinity::Types::TypeID assetType,
const std::string &  assetPath 
)

Constructs an AssetLoadInfo with simplified path specification.

Creates an AssetLoadInfo with only the asset type and path, using default values for corePath and loadPrefix.

Parameters
assetTypeThe type identifier for the asset being loaded
assetPathThe path to the asset file

Member Data Documentation

◆ assetPath

std::string Infinity::Assets::AssetLoadInfo::assetPath

The relative path to the specific asset file being loaded.

◆ assetType

Infinity::Types::TypeID Infinity::Assets::AssetLoadInfo::assetType

The type identifier for the asset.

Determines how the asset will be processed by the loader.

◆ corePath

std::string Infinity::Assets::AssetLoadInfo::corePath

The base directory path where assets are stored.

Serves as the root location for asset resolution.

◆ loadPrefix

std::string Infinity::Assets::AssetLoadInfo::loadPrefix

Additional path component prepended to the asset path.

Can be used for organizing assets into subdirectories or applying context-specific path modifications during loading.