OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::LazyBase::OnDemandBuild Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Lazy.hpp>

Collaboration diagram for Slic3r::GUI::LazyBase::OnDemandBuild:

Public Member Functions

 OnDemandBuild (const LazyBase &lazy)
 ~OnDemandBuild ()
void unit ()

Private Attributes

const LazyBase & m_lazy
std::unique_ptr< wxBusyCursor > m_busy
std::chrono::steady_clock::time_point m_started
int m_units { 0 }

Detailed Description

Constructor & Destructor Documentation

◆ OnDemandBuild()

Slic3r::GUI::LazyBase::OnDemandBuild::OnDemandBuild ( const LazyBase & lazy)
explicit
12 : m_lazy(lazy), m_started(std::chrono::steady_clock::now())
13{
14 // The unit tests have no app.
15 if (wxTheApp != nullptr)
16 m_busy = std::make_unique<wxBusyCursor>();
17}
std::chrono::steady_clock::time_point m_started
Definition Lazy.hpp:55
std::unique_ptr< wxBusyCursor > m_busy
Definition Lazy.hpp:54
const LazyBase & m_lazy
Definition Lazy.hpp:53

References m_busy, m_lazy, and m_started.

◆ ~OnDemandBuild()

Slic3r::GUI::LazyBase::OnDemandBuild::~OnDemandBuild ( )
20{
21 BOOST_LOG_TRIVIAL(info) << "Lazy::ensure: built " << m_lazy.name() << " on demand, " << m_units << " unit(s) in "
22 << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - m_started).count() << " ms";
23}
int m_units
Definition Lazy.hpp:56

References m_lazy, m_started, and m_units.

Member Function Documentation

◆ unit()

void Slic3r::GUI::LazyBase::OnDemandBuild::unit ( )
inline
50{ ++m_units; }

References m_units.

Referenced by Slic3r::GUI::Lazy< T >::ensure().

Here is the caller graph for this function:

Member Data Documentation

◆ m_busy

std::unique_ptr<wxBusyCursor> Slic3r::GUI::LazyBase::OnDemandBuild::m_busy
private

Referenced by OnDemandBuild().

◆ m_lazy

const LazyBase& Slic3r::GUI::LazyBase::OnDemandBuild::m_lazy
private

Referenced by OnDemandBuild(), and ~OnDemandBuild().

◆ m_started

std::chrono::steady_clock::time_point Slic3r::GUI::LazyBase::OnDemandBuild::m_started
private

Referenced by OnDemandBuild(), and ~OnDemandBuild().

◆ m_units

int Slic3r::GUI::LazyBase::OnDemandBuild::m_units { 0 }
private
56{ 0 };

Referenced by ~OnDemandBuild(), and unit().


The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Lazy.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Lazy.cpp