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

eagine::application::launch_options Class Reference

Class managing options for an application with video / audio rendering. More...

#include <eagine/application/options.hpp>

Public Member Functions

 launch_options (main_ctx_parent parent) noexcept
 Constructor with parent main context object.
 
auto application_title () const noexcept -> string_view
 Returns the title of the application.
 
auto no_video () noexcept -> auto &
 Specifies that no video rendering should be used. More...
 
auto require_video (video_context_kind kind=video_context_kind::opengl, identifier instance={}) -> video_options &
 Requests a new video rendering context and surface. More...
 
auto video_requirements () const noexcept -> const std::map< identifier, video_options > &
 Returns all current video rendering context options. More...
 
auto no_audio () noexcept -> auto &
 Specifies that no audio playback or recording should be used. More...
 
auto require_audio (audio_context_kind kind=audio_context_kind::openal, identifier instance={}) -> audio_options &
 Requests a new audio playback and recording context. More...
 
auto audio_requirements () const noexcept -> const std::map< identifier, audio_options > &
 Returns all current audio rendering context options. More...
 
auto no_input () noexcept -> auto &
 Specifies that no user input should be used. More...
 
auto require_input () noexcept -> auto &
 Specifies that user input handling is required. More...
 
auto required_input () const noexcept -> bool
 Indicates if user input handling is required.
 
template<typename R , typename P >
auto enough_run_time (std::chrono::duration< R, P > run_time) const noexcept -> bool
 Says if the application ran long enough according to the configuration.
 
auto enough_frames (span_size_t frame_no) const noexcept -> bool
 Says if the application rendered enough frames according to the configuration.
 
- Public Member Functions inherited from eagine::main_ctx_object
 main_ctx_object (identifier obj_id, main_ctx_parent parent) noexcept
 Initialization from object id and parent.
 
auto process_instance_id () const noexcept -> process_instance_id_t
 Returns the process id.
 
auto main_context () const noexcept -> main_ctx &
 Returns a reference to the main context singleton.
 
auto app_config () const noexcept -> application_config &
 Returns a reference to the application config object.
 
auto as_parent () noexcept -> main_ctx_object_parent_info
 Returns this as main_ctx_object_parent_info.
 
template<typename T >
auto cfg_init (string_view key, T initial, string_view tag={}) -> T
 Reads and returns the configuration value identified by key.
 
template<typename Extractable , typename T >
auto cfg_extr (string_view key, T initial, string_view tag={}, type_identity< Extractable >={}) -> T
 Reads and returns the configuration value identified by key.
 
- Public Member Functions inherited from eagine::named_logging_object< main_ctx_log_backend_getter >
 named_logging_object (identifier id, main_ctx_log_backend_getter backend_getter) noexcept
 Constructor from identifier and backend_getter object. More...
 
 named_logging_object (identifier id, const named_logging_object &parent) noexcept
 Constructor from logger id and parent logging object.
 
 named_logging_object () noexcept=default
 Construct logging object without backend.
 
 named_logging_object (named_logging_object &&temp) noexcept
 Move constructor.
 
 named_logging_object (const named_logging_object &that) noexcept
 Copy constructor.
 
auto operator= (named_logging_object &&) noexcept -> named_logging_object &=default
 Move assignment operator.
 
auto operator= (const named_logging_object &) -> named_logging_object &=default
 Copy assignment operator.
 
constexpr auto object_id () const noexcept
 Returns the identifier of this logging object.
 
void object_description (string_view display_name, string_view description) noexcept
 Sets the human-readable name and description of this object.
 
auto log_fatal (string_view format) noexcept
 Create a log message entry for fatal error, with specified format. More...
 
auto log_error (string_view format) noexcept
 Create a log message entry for error, with specified format. More...
 
auto log_warning (string_view format) noexcept
 Create a log message entry for warning, with specified format. More...
 
auto log_info (string_view format) noexcept
 Create a log message entry for information, with specified format. More...
 
auto log_stat (string_view format) noexcept
 Create a log message entry for statistic, with specified format. More...
 
auto log_debug (string_view format) noexcept
 Create a log message entry for debugging, with specified format. More...
 
auto log_trace (string_view format) noexcept
 Create a log message entry for tracing, with specified format. More...
 
auto log_backtrace (string_view format) noexcept
 Create a log message entry for backtracing, with specified format. More...
 
auto log_debug_stream () noexcept
 Returns a log entry stream for debug messages. More...
 
auto log_error_stream () noexcept
 Returns a log entry stream for error messages. More...
 
auto log_chart_sample (identifier series, float value) noexcept -> named_logging_object &
 Stores a new value in the specified chart data series.
 
auto log_chart_sample (identifier series, const tagged_quantity< T, U > &qty) noexcept -> std::enable_if_t< std::is_convertible_v< T, float >, named_logging_object & >
 Stores a new value in the specified chart data series.
 
auto log_chart_sample (identifier series, const valid_if< T, P > &opt_value) noexcept -> named_logging_object &
 Stores a new value in the specified chart data series.
 
- Public Member Functions inherited from eagine::basic_logger< main_ctx_log_backend_getter >
auto backend () noexcept
 Returns a pointer to the backend of this logger object.
 
auto instance_id () const noexcept -> logger_instance_id
 Returns the unique id of this logger instance.
 

Additional Inherited Members

- Public Types inherited from eagine::named_logging_object< main_ctx_log_backend_getter >
using entry_type = std::conditional_t< is_log_level_enabled_v< severity >, log_entry, no_log_entry >
 The entry type for the specified log_event_severity. More...
 
- Public Types inherited from eagine::basic_logger< main_ctx_log_backend_getter >
using entry_type = std::conditional_t< is_log_level_enabled_v< severity >, log_entry, no_log_entry >
 The entry type for the specified log_event_severity. More...
 

Detailed Description

Class managing options for an application with video / audio rendering.

See also
video_options
audio_options
application_config

Instances of this class read the application configuration and provide access to general application options.

Member Function Documentation

◆ audio_requirements()

auto eagine::application::launch_options::audio_requirements ( ) const -> const std::map<identifier, audio_options>&
inlinenoexcept

Returns all current audio rendering context options.

See also
require_audio
video_requirements

◆ no_audio()

auto eagine::application::launch_options::no_audio ( ) -> auto&
inlinenoexcept

Specifies that no audio playback or recording should be used.

See also
require_audio
no_video
no_input

◆ no_input()

auto eagine::application::launch_options::no_input ( ) -> auto&
inlinenoexcept

Specifies that no user input should be used.

See also
require_input
no_video
no_audio

◆ no_video()

auto eagine::application::launch_options::no_video ( ) -> auto&
inlinenoexcept

Specifies that no video rendering should be used.

See also
require_video
no_audio
no_input

◆ require_audio()

auto eagine::application::launch_options::require_audio ( audio_context_kind  kind = audio_context_kind::openal,
identifier  instance = {} 
) -> audio_options &

Requests a new audio playback and recording context.

Parameters
kindthe kind of the requested context.
See also
instance identifier for the requested context.
no_audio
require_video
audio_requirements

◆ require_input()

auto eagine::application::launch_options::require_input ( ) -> auto&
inlinenoexcept

Specifies that user input handling is required.

See also
no_input
require_input

◆ require_video()

auto eagine::application::launch_options::require_video ( video_context_kind  kind = video_context_kind::opengl,
identifier  instance = {} 
) -> video_options &

Requests a new video rendering context and surface.

Parameters
kindthe kind of the requested context.
See also
instance identifier for the requested context.
no_video
require_audio
video_requirements

◆ video_requirements()

auto eagine::application::launch_options::video_requirements ( ) const -> const std::map<identifier, video_options>&
inlinenoexcept

Returns all current video rendering context options.

See also
require_video
audio_requirements

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).