OGLplus  (0.59.0) a C++ wrapper for rendering APIs

Class for a single-instance object providing useful information ans services. More...

#include <eagine/main_ctx.hpp>

Public Member Functions

 main_ctx (main_ctx &&)=delete
 Not move constructible.
 
 main_ctx (const main_ctx &)=delete
 Not copy constructible.
 
auto operator= (main_ctx &&)=delete
 Not move assignable.
 
auto operator= (const main_ctx &)=delete
 Not copy asignable.
 
auto instance_id () const noexcept -> process_instance_id_t
 Returns this process instance id. Not equal to system PID.
 
auto preinitialize () noexcept -> main_ctx &
 Does potentially expensive initialization and caching.
 
auto build () const noexcept -> const build_info &
 Returns a reference to build information instance.
 
auto args () noexcept -> program_args &
 Returns a reference to program arguments wrapper.
 
auto log () noexcept -> logger &
 Returns a reference to the root logger object.
 
auto watchdog () noexcept -> process_watchdog &
 Returns a reference to process watchdog object.
 
auto config () noexcept -> application_config &
 Returns a reference to application config object.
 
auto system () noexcept -> system_info &
 Returns a reference to system information object.
 
auto user () noexcept -> user_info &
 Returns a reference to user information object.
 
auto scratch_space () noexcept -> memory::buffer &
 Returns a reference to shared temporary buffer.
 
auto compressor () noexcept -> data_compressor &
 Returns a reference to shared data compressor object.
 
auto exe_path () const noexcept -> string_view
 Returns the executable path.
 
auto app_name () const noexcept -> string_view
 Returns the application name.
 

Static Public Member Functions

static auto get () noexcept -> main_ctx &
 Returns the single instance.
 

Detailed Description

Class for a single-instance object providing useful information ans services.

A single instance of this class is initialized in the main function and constructs several useful utility service objects that can be shared throughout the system.

Examples
eagine/sudoku_noise.cpp.

The documentation for this class was generated from the following file:

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).