libsir 2.2.5
Standard Incident Reporter
Loading...
Searching...
No Matches
sir::default_policy Class Reference

In the event that no custom configuration or behavior is desired, provides defaults for everything. More...

Inheritance diagram for sir::default_policy:
[legend]

Public Member Functions

bool get_init_data (sirinit &data) const noexcept final
 Called by logger before initializing libsir.
 
constexpr bool on_init_complete () const noexcept final
 Called by logger immediately after libsir has been initialized.
 
- Public Member Functions inherited from sir::policy

Additional Inherited Members

- Static Public Member Functions inherited from sir::policy
static constexpr bool throw_on_error () noexcept
 Determines whether or not exceptions are thrown in the event that an unercoverable error is encountered by logger or its associated adapter(s).
 
- Protected Member Functions inherited from sir::policy

Detailed Description

In the event that no custom configuration or behavior is desired, provides defaults for everything.

  • Uses all default values for sir_init
  • Performs no post-initialization configuration
  • Exceptions are thrown when errors are encountered

Member Function Documentation

◆ get_init_data()

bool sir::default_policy::get_init_data ( sirinit & data) const
inlinefinalvirtualnoexcept

Called by logger before initializing libsir.

Provides the policy with an opportunity to customize the initial configuration.

See also
sirinit
sir_makeinit
Note
For the default configuration, pass the address of data to sir_makeinit.
Most, if not all of the options chosen during initialization can be modified post-initialization.
Parameters
dataReference to a sirinit struct representing the initial configuration.
Returns
true if data is ready to pass to sir_init, or false if an error occurred. Returning false will cause logger to abort the initialization process, and possibly throw an exception.

Implements sir::policy.

◆ on_init_complete()

bool sir::default_policy::on_init_complete ( ) const
inlineconstexprfinalvirtualnoexcept

Called by logger immediately after libsir has been initialized.

This is the moment in time which should be utilized for further configuration than is possible via sir_init alone.

Some potential actions include:

Returns
true if configuration was completed successfully, or false if an error occurred. Returning false will cause logger to abort the initialization process, and possibly throw an exception.

Implements sir::policy.


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