Infinity Engine v0.6.20
C++ API Documentation
Loading...
Searching...
No Matches
Infinity::Engine::InfinityCore Class Reference

Interface for loading and accessing procedural generation systems from .infinitycore files. More...

#include <InfinityCore.hpp>

Public Member Functions

 InfinityCore ()
 Default constructor.
 
 InfinityCore (InfinityCore &&core)
 Move constructor.
 
 InfinityCore (const std::filesystem::path &filepath)
 Constructs an InfinityCore and loads the specified .infinitycore file.
 
std::shared_ptr< Infinity::Procedural::ProceduralSystemgetSystem (const std::string &path)
 Retrieves a ProceduralSystem from the loaded core by path.
 
std::string getAssetFolderPath ()
 Gets the absolute folder path where assets are stored.
 
const std::string & getAssetRelativePath ()
 Gets the relative path to assets within the core.
 

Friends

class InfinityCoreImpl
 

Detailed Description

Interface for loading and accessing procedural generation systems from .infinitycore files.

InfinityCore provides a high-level interface to .infinitycore files, which contain ProceduralSystems and associated assets that support procedural generation. The class handles loading the core file and provides access to its contained systems and asset paths.

Constructor & Destructor Documentation

◆ InfinityCore() [1/3]

Infinity::Engine::InfinityCore::InfinityCore ( )

Default constructor.

Constructs an InfinityCore without loading any core file.

◆ InfinityCore() [2/3]

Infinity::Engine::InfinityCore::InfinityCore ( InfinityCore &&  core)

Move constructor.

Parameters
coreThe InfinityCore object to move from.

◆ InfinityCore() [3/3]

Infinity::Engine::InfinityCore::InfinityCore ( const std::filesystem::path &  filepath)

Constructs an InfinityCore and loads the specified .infinitycore file.

Parameters
filepathPath to the .infinitycore file to load.

Member Function Documentation

◆ getAssetFolderPath()

std::string Infinity::Engine::InfinityCore::getAssetFolderPath ( )

Gets the absolute folder path where assets are stored.

Returns
The absolute path to the asset folder as a string.

◆ getAssetRelativePath()

const std::string & Infinity::Engine::InfinityCore::getAssetRelativePath ( )

Gets the relative path to assets within the core.

Returns
A const reference to the relative asset path string.

◆ getSystem()

std::shared_ptr< Infinity::Procedural::ProceduralSystem > Infinity::Engine::InfinityCore::getSystem ( const std::string &  path)

Retrieves a ProceduralSystem from the loaded core by path.

Parameters
pathThe path identifier of the system within the core file.
Returns
A shared pointer to the requested ProceduralSystem, or nullptr if not found.

Friends And Related Symbol Documentation

◆ InfinityCoreImpl

friend class InfinityCoreImpl
friend