ComPPare 1.0.0
Loading...
Searching...
No Matches
comppare::current_state Class Reference

Singleton class for the current state. More...

#include <config.hpp>

Public Member Functions

 current_state (const current_state &)=delete
 Deleted copy constructor.
 
 current_state (current_state &&)=delete
 Deleted move constructor.
 
current_stateoperator= (const current_state &)=delete
 Deleted copy assignment operator.
 
current_stateoperator= (current_state &&)=delete
 Deleted move assignment operator.
 

Static Public Member Functions

static bool using_plugin ()
 Get if a plugin is being used currently.
 
static void set_using_plugin (bool v)
 Set if a plugin is being used currently.
 
static std::string_view impl_name ()
 Get the name of the current implementation.
 
static void set_impl_name (std::string_view name)
 Set the name of the current implementation.
 

Private Member Functions

 current_state ()=default
 Private Default kconstructor.
 

Static Private Member Functions

static current_stateinstance ()
 Get the singleton instance of the current_state class.
 

Private Attributes

bool using_plugin_ {false}
 The current state of plugin usage.
 
std::string_view impl_name_
 The name of the current implementation.
 

Detailed Description

Singleton class for the current state.

This singleton class holds the current state of the benchmarking process. It tracks whether a plugin is being used and the name of the current implementation.

Note
Singleton is chosen as this is a header only library, using global variables will require user to declare them in a .cpp file.

Constructor & Destructor Documentation

◆ current_state() [1/3]

comppare::current_state::current_state ( const current_state )
delete

Deleted copy constructor.

◆ current_state() [2/3]

comppare::current_state::current_state ( current_state &&  )
delete

Deleted move constructor.

◆ current_state() [3/3]

comppare::current_state::current_state ( )
privatedefault

Private Default kconstructor.

Member Function Documentation

◆ impl_name()

static std::string_view comppare::current_state::impl_name ( )
inlinestatic

Get the name of the current implementation.

◆ instance()

static current_state & comppare::current_state::instance ( )
inlinestaticprivate

Get the singleton instance of the current_state class.

◆ operator=() [1/2]

current_state & comppare::current_state::operator= ( const current_state )
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

current_state & comppare::current_state::operator= ( current_state &&  )
delete

Deleted move assignment operator.

◆ set_impl_name()

static void comppare::current_state::set_impl_name ( std::string_view  name)
inlinestatic

Set the name of the current implementation.

◆ set_using_plugin()

static void comppare::current_state::set_using_plugin ( bool  v)
inlinestatic

Set if a plugin is being used currently.

◆ using_plugin()

static bool comppare::current_state::using_plugin ( )
inlinestatic

Get if a plugin is being used currently.

Member Data Documentation

◆ impl_name_

std::string_view comppare::current_state::impl_name_
private

The name of the current implementation.

◆ using_plugin_

bool comppare::current_state::using_plugin_ {false}
private

The current state of plugin usage.


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