LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::AppBuilder Class Reference

Creates a new builder for an App. More...

#include <app.hpp>

Inherits LiteFX::Builder< App >.

Public Member Functions

void use (UniquePtr< IBackend > &&backend)
 
template<typename TSink , typename ... TArgs>
requires std::convertible_to<TSink*, ISink*>
AppBuilderlogTo (TArgs &&... args)
 Registers a sink for logging.
 
template<typename TBackend , typename ... TArgs>
requires meta::implements<TBackend, IBackend>
AppBuilderuseBackend (TArgs &&... args)
 Registers a new backend.
 
- Public Member Functions inherited from LiteFX::Builder< App >
constexpr const Appinstance () const noexcept
 Returns a pointer to the current instance of the object that is built by the builder.
 
constexpr const TParent & parent () const noexcept
 Returns a reference of the parent builder.
 
constexpr Builder (TParent &parent, TPointer &&instance) noexcept
 Initializes the builder instance.
 
constexpr Builder (Builder &&_other) noexcept
 Initializes the builder instance by taking over another instance.
 
constexpr Builder (const Builder &)=delete
 
auto operator= (const Builder &)=delete
 
auto operator= (Builder &&) noexcept=delete
 
virtual constexpr ~Builder () noexcept=default
 
void use (pointer_type &&) noexcept=delete
 Called by child builders to pass a constructed object back to the parent builder.
 
constexpr TParent & add ()
 First, calls build, then use on the parent builder using the current object instance and finally returns the parent builder.
 

Additional Inherited Members

- Public Types inherited from LiteFX::Builder< App >
using instance_type
 
using parent_type
 
using pointer_type
 
- Protected Member Functions inherited from LiteFX::Builder< App >
constexpr Appinstance () noexcept
 Returns a pointer to the current instance of the object that is built by the builder.
 
virtual constexpr void build ()
 Can be overwritten to perform any pre-construction work before the builder returns the final object instance.
 

Detailed Description

Creates a new builder for an App.

Member Function Documentation

◆ logTo()

template<typename TSink , typename ... TArgs>
requires std::convertible_to<TSink*, ISink*>
AppBuilder & LiteFX::AppBuilder::logTo ( TArgs &&... args)
inline

Registers a sink for logging.

◆ use()

void AppBuilder::use ( UniquePtr< IBackend > && backend)

◆ useBackend()

template<typename TBackend , typename ... TArgs>
requires meta::implements<TBackend, IBackend>
AppBuilder & LiteFX::AppBuilder::useBackend ( TArgs &&... args)
inline

Registers a new backend.