LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::AppBuilder Class Reference

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

#include <app.hpp>

Inherits LiteFX::Builder< AppBuilder, 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. More...
 
template<typename TBackend , typename ... TArgs>
requires rtti::implements<TBackend, IBackend>
AppBuilderuseBackend (TArgs &&... args)
 Registers a new backend. More...
 
- Public Member Functions inherited from LiteFX::Builder< AppBuilder, App >
const Appinstance () const noexcept
 Returns a pointer to the current instance of the object that is built by the builder. More...
 
const TParent & parent () const noexcept
 Returns a reference of the parent builder. More...
 
 Builder (TParent &parent, TPointer &&instance) noexcept
 Initializes the builder instance. More...
 
 Builder (builder_type &&_other) noexcept
 Initializes the builder instance by taking over another instance. More...
 
 Builder (const builder_type &)=delete
 
virtual ~Builder () noexcept=default
 
void use (pointer_type &&)=delete
 Called by child builders to pass a constructed object back to the parent builder. More...
 
TParent & add ()
 First, calls build, then use on the parent builder using the current object instance and finally returns the parent builder. More...
 

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from LiteFX::Builder< AppBuilder, App >
using derived_type = AppBuilder
 
using instance_type = App
 
using parent_type = TParent
 
using pointer_type = TPointer
 
using builder_type = Builder< derived_type, instance_type, parent_type, pointer_type >
 

Detailed Description

Creates a new builder for an App.

Member Function Documentation

◆ build()

void AppBuilder::build ( )
overrideprotectedvirtual

Can be overwritten to perform any pre-construction work before the builder returns the final object instance.

Reimplemented from LiteFX::Builder< AppBuilder, App >.

◆ 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 rtti::implements<TBackend, IBackend>
AppBuilder & LiteFX::AppBuilder::useBackend ( TArgs &&...  args)
inline

Registers a new backend.