Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT > Class Template Reference

#include <src/libslic3r/PrintBase.hpp>

+ Inheritance diagram for Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >:
+ Collaboration diagram for Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >:

Public Types

using PrintObjectStepEnum = PrintObjectStepEnumType
 
typedef PrintState< PrintObjectStepEnum, COUNT > PrintObjectState
 
using Timestamp = uint64_t
 

Public Member Functions

PrintTypeprint ()
 
const PrintTypeprint () const
 
bool is_step_done (PrintObjectStepEnum step) const
 
PrintStateBase::StateWithTimeStamp step_state_with_timestamp (PrintObjectStepEnum step) const
 
PrintStateBase::StateWithWarnings step_state_with_warnings (PrintObjectStepEnum step) const
 
auto last_completed_step () const
 
const ModelObjectmodel_object () const
 
ModelObjectmodel_object ()
 
ObjectID id () const
 
virtual Timestamp timestamp () const
 

Static Public Attributes

static constexpr const size_t PrintObjectStepEnumSize = COUNT
 

Protected Member Functions

 PrintObjectBaseWithState (PrintType *print, ModelObject *model_object)
 
bool set_started (PrintObjectStepEnum step)
 
PrintStateBase::TimeStamp set_done (PrintObjectStepEnum step)
 
bool invalidate_step (PrintObjectStepEnum step)
 
template<typename StepTypeIterator >
bool invalidate_steps (StepTypeIterator step_begin, StepTypeIterator step_end)
 
bool invalidate_steps (std::initializer_list< PrintObjectStepEnum > il)
 
bool invalidate_all_steps ()
 
bool is_step_started_unguarded (PrintObjectStepEnum step) const
 
bool is_step_done_unguarded (PrintObjectStepEnum step) const
 
bool is_step_enabled_unguarded (PrintObjectStepEnum step) const
 
void enable_step_unguarded (PrintObjectStepEnum step, bool enable)
 
void enable_all_steps_unguarded (bool enable)
 
void finalize_impl ()
 
bool query_reset_dirty_step_unguarded (PrintObjectStepEnum step)
 
void active_step_add_warning (PrintStateBase::WarningLevel warning_level, const std::string &message, int message_id=0)
 
void throw_if_canceled ()
 
void status_update_warnings (PrintBase *print, int step, PrintStateBase::WarningLevel warning_level, const std::string &message)
 
void set_new_unique_id ()
 
void set_invalid_id ()
 
void copy_id (const ObjectBase &rhs)
 
virtual void assign_new_unique_ids_recursive ()
 

Static Protected Member Functions

static std::mutex & state_mutex (PrintBase *print)
 
static std::function< void()> cancel_callback (PrintBase *print)
 

Protected Attributes

friend PrintType
 
PrintTypem_print
 
ModelObjectm_model_object
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar)
 

Static Private Member Functions

static ObjectID generate_new_id ()
 
template<class Archive >
static void load_and_construct (Archive &ar, cereal::construct< ObjectBase > &construct)
 

Private Attributes

PrintState< PrintObjectStepEnum, COUNT > m_state
 
ObjectID m_id
 

Static Private Attributes

static size_t s_last_id = 0
 

Detailed Description

template<typename PrintType, typename PrintObjectStepEnumType, const size_t COUNT>
class Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >

Member Typedef Documentation

◆ PrintObjectState

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
typedef PrintState<PrintObjectStepEnum, COUNT> Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::PrintObjectState

◆ PrintObjectStepEnum

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
using Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::PrintObjectStepEnum = PrintObjectStepEnumType

◆ Timestamp

Constructor & Destructor Documentation

◆ PrintObjectBaseWithState()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::PrintObjectBaseWithState ( PrintType print,
ModelObject model_object 
)
inlineprotected
const ModelObject * model_object() const
Definition PrintBase.hpp:362
PrintObjectBase(ModelObject *model_object)
Definition PrintBase.hpp:366
PrintType * m_print
Definition PrintBase.hpp:806
PrintType * print()
Definition PrintBase.hpp:735

Member Function Documentation

◆ active_step_add_warning()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
void Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::active_step_add_warning ( PrintStateBase::WarningLevel  warning_level,
const std::string &  message,
int  message_id = 0 
)
inlineprotected
794 {
795 std::pair<PrintObjectStepEnum, bool> active_step = m_state.active_step_add_warning(warning_level, message, message_id, PrintObjectBase::state_mutex(m_print));
796 if (active_step.second)
797 this->status_update_warnings(m_print, static_cast<int>(active_step.first), warning_level, message);
798 }
static std::mutex & state_mutex(PrintBase *print)
Definition PrintBase.cpp:110
void status_update_warnings(PrintBase *print, int step, PrintStateBase::WarningLevel warning_level, const std::string &message)
Definition PrintBase.cpp:120
PrintState< PrintObjectStepEnum, COUNT > m_state
Definition PrintBase.hpp:809
std::pair< StepType, bool > active_step_add_warning(PrintStateBase::WarningLevel warning_level, const std::string &message, int message_id, std::mutex &mtx)
Definition PrintBase.hpp:321

References Slic3r::PrintState< StepType, COUNT >::active_step_add_warning(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, Slic3r::PrintObjectBase::state_mutex(), and Slic3r::PrintObjectBase::status_update_warnings().

Referenced by Slic3r::SLAPrint::Steps::generate_preview().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assign_new_unique_ids_recursive()

virtual void Slic3r::ObjectBase::assign_new_unique_ids_recursive ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::Model, Slic3r::ModelObject, and Slic3r::ModelVolume.

79{ this->set_new_unique_id(); }
void set_new_unique_id()
Definition ObjectID.hpp:73

References Slic3r::ObjectBase::set_new_unique_id().

+ Here is the call graph for this function:

◆ cancel_callback()

std::function< void()> Slic3r::PrintObjectBase::cancel_callback ( PrintBase print)
staticprotectedinherited
116{
117 return print->cancel_callback();
118}

References Slic3r::PrintBase::cancel_callback().

Referenced by Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_all_steps(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_step(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_id()

void Slic3r::ObjectBase::copy_id ( const ObjectBase rhs)
inlineprotectedinherited
76{ m_id = rhs.id(); }
ObjectID m_id
Definition ObjectID.hpp:82
size_t id
Definition ObjectID.hpp:37

References Slic3r::ObjectBase::id(), and Slic3r::ObjectBase::m_id.

Referenced by Slic3r::CutObjectBase::copy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enable_all_steps_unguarded()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
void Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::enable_all_steps_unguarded ( bool  enable)
inlineprotected
785{ m_state.enable_all_unguarded(enable); }
void enable_all_unguarded(bool enable)
Definition PrintBase.hpp:154

References Slic3r::PrintState< StepType, COUNT >::enable_all_unguarded(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

+ Here is the call graph for this function:

◆ enable_step_unguarded()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
void Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::enable_step_unguarded ( PrintObjectStepEnum  step,
bool  enable 
)
inlineprotected
784{ m_state.enable_unguarded(step, enable); }
void enable_unguarded(StepType step, bool enable)
Definition PrintBase.hpp:150

References Slic3r::PrintState< StepType, COUNT >::enable_unguarded(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

Referenced by Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_task_impl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ finalize_impl()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
void Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::finalize_impl ( )
inlineprotected
void mark_canceled_unguarded()
Definition PrintBase.hpp:308

References Slic3r::PrintState< StepType, COUNT >::enable_all_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, and Slic3r::PrintState< StepType, COUNT >::mark_canceled_unguarded().

+ Here is the call graph for this function:

◆ generate_new_id()

static ObjectID Slic3r::ObjectBase::generate_new_id ( )
inlinestaticprivateinherited
84{ return ObjectID(++ s_last_id); }
static size_t s_last_id
Definition ObjectID.hpp:85

References Slic3r::ObjectBase::s_last_id.

Referenced by Slic3r::ObjectBase::set_new_unique_id().

+ Here is the caller graph for this function:

◆ id()

ObjectID Slic3r::ObjectBase::id ( ) const
inlineinherited
55{ return m_id; }

References Slic3r::ObjectBase::m_id.

Referenced by Slic3r::Model::Model(), Slic3r::ModelInstance::ModelInstance(), Slic3r::ModelMaterial::ModelMaterial(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), Slic3r::_3MF_Importer::_load_model_from_file(), Slic3r::GUI::Plater::priv::actualize_slicing_warnings(), Slic3r::ModelObjectStatusDB::add(), Slic3r::ModelObjectStatusDB::add_if_new(), Slic3r::Print::apply(), Slic3r::SLAPrint::apply(), Slic3r::GUI::GLGizmoFdmSupports::apply_data_from_backend(), Slic3r::ModelVolume::check(), Slic3r::check_model_ids_equal(), Slic3r::ModelObject::convert_units(), Slic3r::ObjectBase::copy_id(), Slic3r::PrintObjectStatusDB::count(), anonymous_namespace{RaycastManager.cpp}::create_key(), priv::create_volume(), Slic3r::GUI::Emboss::create_volume_sources(), Slic3r::GUI::GLGizmoHollow::data_changed(), Slic3r::GUI::GLGizmoPainterBase::data_changed(), Slic3r::GUI::GLGizmoSlaSupports::data_changed(), Slic3r::Model::delete_object(), Slic3r::GUI::Plater::export_stl_obj(), Slic3r::ModelObjectStatusDB::get(), Slic3r::GUI::get_arrange_poly(), Slic3r::GUI::GLGizmoSlaSupports::get_data_from_backend(), Slic3r::PrintObjectStatusDB::get_range(), Slic3r::GUI::GLGizmoFdmSupports::has_backend_supports(), Slic3r::GUI::GLGizmoSlaSupports::has_backend_supports(), Slic3r::CutObjectBase::has_same_id(), Slic3r::UndoRedo::StackImpl::immutable_object_id_impl(), Slic3r::GUI::GLGizmoSimplify::init_model(), Slic3r::inner_brim_area(), Slic3r::ModelObject::is_cut(), Slic3r::CutObjectBase::is_equal(), Slic3r::ObjectBase::load_and_construct(), Slic3r::UndoRedo::StackImpl::load_snapshot(), Slic3r::GUI::ObjectList::merge(), Slic3r::model_property_changed(), Slic3r::model_volume_list_changed(), Slic3r::model_volume_list_copy_configs(), Slic3r::ModelConfigObject::object_id_and_timestamp_match(), Slic3r::ObjectWithTimestamp::object_id_and_timestamp_match(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::CommonGizmosDataObjects::SelectionInfo::on_update(), Slic3r::CutObjectBase::operator<(), Slic3r::Model::operator=(), Slic3r::ModelObject::operator=(), Slic3r::ModelObject::operator=(), Slic3r::CutObjectBase::operator==(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), Slic3r::GUI::GLGizmoEmboss::process(), Slic3r::GUI::processed_objects_idxs(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLCanvas3D::LayersEditing::select_object(), Slic3r::ModelMaterial::serialize(), Slic3r::SLAPrintObject::SliceRecord::set_model_slice_idx(), Slic3r::SLAPrintObject::SliceRecord::set_support_slice_idx(), Slic3r::slices_to_regions(), Slic3r::ModelObject::split(), Slic3r::UndoRedo::StackImpl::take_snapshot(), Slic3r::top_level_outer_brim_area(), Slic3r::GUI::update_object_cut_id(), and anonymous_namespace{EmbossJob.cpp}::update_volume_name().

◆ invalidate_all_steps()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_all_steps ( )
inlineprotected
static std::function< void()> cancel_callback(PrintBase *print)
Definition PrintBase.cpp:115
bool invalidate_all(CancelationCallback cancel)
Definition PrintBase.hpp:279

References Slic3r::PrintObjectBase::cancel_callback(), Slic3r::PrintState< StepType, COUNT >::invalidate_all(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

Referenced by Slic3r::SLAPrintObject::invalidate_all_steps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidate_step()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_step ( PrintObjectStepEnum  step)
inlineprotected
bool invalidate(StepType step, CancelationCallback cancel)
Definition PrintBase.hpp:227

References Slic3r::PrintObjectBase::cancel_callback(), Slic3r::PrintState< StepType, COUNT >::invalidate(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

Referenced by Slic3r::SLAPrintObject::invalidate_step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidate_steps() [1/2]

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps ( std::initializer_list< PrintObjectStepEnum il)
inlineprotected
776 { return m_state.invalidate_multiple(il.begin(), il.end(), PrintObjectBase::cancel_callback(m_print)); }
bool invalidate_multiple(StepTypeIterator step_begin, StepTypeIterator step_end, CancelationCallback cancel)
Definition PrintBase.hpp:249

References Slic3r::PrintObjectBase::cancel_callback(), Slic3r::PrintState< StepType, COUNT >::invalidate_multiple(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

+ Here is the call graph for this function:

◆ invalidate_steps() [2/2]

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
template<typename StepTypeIterator >
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps ( StepTypeIterator  step_begin,
StepTypeIterator  step_end 
)
inlineprotected
774 { return m_state.invalidate_multiple(step_begin, step_end, PrintObjectBase::cancel_callback(m_print)); }

References Slic3r::PrintObjectBase::cancel_callback(), Slic3r::PrintState< StepType, COUNT >::invalidate_multiple(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

Referenced by Slic3r::SLAPrintObject::invalidate_step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_step_done()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_done ( PrintObjectStepEnum  step) const
inline
bool is_done(StepType step, std::mutex &mtx) const
Definition PrintBase.hpp:134

References Slic3r::PrintState< StepType, COUNT >::is_done(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, and Slic3r::PrintObjectBase::state_mutex().

Referenced by Slic3r::GUI::GLCanvas3D::_load_print_object_toolpaths(), Slic3r::GUI::GLCanvas3D::_render_sla_slices(), Slic3r::SLAPrintObject::get_current_elevation(), Slic3r::SLAPrintObject::pad_mesh(), and Slic3r::SLAPrintObject::support_mesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_step_done_unguarded()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_done_unguarded ( PrintObjectStepEnum  step) const
inlineprotected
781{ return m_state.is_done_unguarded(step); }
bool is_done_unguarded(StepType step) const
Definition PrintBase.hpp:146

References Slic3r::PrintState< StepType, COUNT >::is_done_unguarded(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

Referenced by Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::last_completed_step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_step_enabled_unguarded()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_enabled_unguarded ( PrintObjectStepEnum  step) const
inlineprotected
783{ return m_state.is_enabled_unguarded(step); }
bool is_enabled_unguarded(StepType step) const
Definition PrintBase.hpp:159

References Slic3r::PrintState< StepType, COUNT >::is_enabled_unguarded(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

Referenced by Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_task_impl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_step_started_unguarded()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_started_unguarded ( PrintObjectStepEnum  step) const
inlineprotected
780{ return m_state.is_started_unguarded(step); }
bool is_started_unguarded(StepType step) const
Definition PrintBase.hpp:142

References Slic3r::PrintState< StepType, COUNT >::is_started_unguarded(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state.

Referenced by Slic3r::PrintBaseWithState< PrintStepEnumType, COUNT >::set_task_impl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ last_completed_step()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
auto Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::last_completed_step ( ) const
inline
744 {
745 static_assert(COUNT > 0, "Step count should be > 0");
746 auto s = int(COUNT) - 1;
747
748 std::lock_guard lk(state_mutex(m_print));
749 while (s >= 0 && ! is_step_done_unguarded(PrintObjectStepEnum(s)))
750 --s;
751
752 if (s < 0)
753 s = COUNT;
754
755 return PrintObjectStepEnum(s);
756 }
bool is_step_done_unguarded(PrintObjectStepEnum step) const
Definition PrintBase.hpp:781
PrintObjectStepEnumType PrintObjectStepEnum
Definition PrintBase.hpp:732

References Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_done_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, and Slic3r::PrintObjectBase::state_mutex().

Referenced by Slic3r::GUI::GLGizmoSlaSupports::data_changed(), Slic3r::SLAPrintObject::get_mesh_to_print(), Slic3r::SLAPrintObject::get_parts_to_slice(), Slic3r::GUI::update_arrangepoly_slaprint(), and Slic3r::GUI::GLGizmoSlaBase::update_volumes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_and_construct()

template<class Archive >
static void Slic3r::ObjectBase::load_and_construct ( Archive &  ar,
cereal::construct< ObjectBase > &  construct 
)
inlinestaticprivateinherited
96{ ObjectID id; ar(id); construct(id); }
ObjectID id() const
Definition ObjectID.hpp:55

References Slic3r::ObjectBase::id().

+ Here is the call graph for this function:

◆ model_object() [1/2]

ModelObject * Slic3r::PrintObjectBase::model_object ( )
inlineinherited
363{ return m_model_object; }
ModelObject * m_model_object
Definition PrintBase.hpp:376

References Slic3r::PrintObjectBase::m_model_object.

◆ model_object() [2/2]

◆ print() [1/2]

◆ print() [2/2]

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
const PrintType * Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::print ( ) const
inline

◆ query_reset_dirty_step_unguarded()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::query_reset_dirty_step_unguarded ( PrintObjectStepEnum  step)
inlineprotected
790{ return m_state.query_reset_dirty_unguarded(step); }
bool query_reset_dirty_unguarded(StepType step)
Definition PrintBase.hpp:297

References Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, and Slic3r::PrintState< StepType, COUNT >::query_reset_dirty_unguarded().

+ Here is the call graph for this function:

◆ serialize()

template<class Archive >
void Slic3r::ObjectBase::serialize ( Archive &  ar)
inlineprivateinherited
92{ ar(m_id); }

References Slic3r::ObjectBase::m_id.

◆ set_done()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
PrintStateBase::TimeStamp Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_done ( PrintObjectStepEnum  step)
inlineprotected
763 {
764 std::pair<PrintStateBase::TimeStamp, bool> status = m_state.set_done(step, PrintObjectBase::state_mutex(m_print), [this](){ this->throw_if_canceled(); });
765 if (status.second)
766 this->status_update_warnings(m_print, static_cast<int>(step), PrintStateBase::WarningLevel::NON_CRITICAL, std::string());
767 return status.first;
768 }
void throw_if_canceled()
Definition PrintBase.hpp:803
std::pair< TimeStamp, bool > set_done(StepType step, std::mutex &mtx, ThrowIfCanceled throw_if_canceled)
Definition PrintBase.hpp:202

References Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, Slic3r::PrintStateBase::NON_CRITICAL, Slic3r::PrintState< StepType, COUNT >::set_done(), Slic3r::PrintObjectBase::state_mutex(), Slic3r::PrintObjectBase::status_update_warnings(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::throw_if_canceled().

+ Here is the call graph for this function:

◆ set_invalid_id()

void Slic3r::ObjectBase::set_invalid_id ( )
inlineprotectedinherited
74{ m_id = 0; }

References Slic3r::ObjectBase::m_id.

Referenced by Slic3r::CutObjectBase::invalidate().

+ Here is the caller graph for this function:

◆ set_new_unique_id()

void Slic3r::ObjectBase::set_new_unique_id ( )
inlineprotectedinherited
73{ m_id = generate_new_id(); }
static ObjectID generate_new_id()
Definition ObjectID.hpp:84

References Slic3r::ObjectBase::generate_new_id(), and Slic3r::ObjectBase::m_id.

Referenced by Slic3r::ModelVolume::ModelVolume(), Slic3r::Model::assign_new_unique_ids_recursive(), Slic3r::ObjectBase::assign_new_unique_ids_recursive(), Slic3r::ModelObject::assign_new_unique_ids_recursive(), Slic3r::CutObjectBase::init(), Slic3r::ModelMaterial::set_new_unique_id(), Slic3r::ModelObject::set_new_unique_id(), and Slic3r::ModelVolume::set_new_unique_id().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_started()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
bool Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_started ( PrintObjectStepEnum  step)
inlineprotected
762 { return m_state.set_started(step, PrintObjectBase::state_mutex(m_print), [this](){ this->throw_if_canceled(); }); }
bool set_started(StepType step, std::mutex &mtx, ThrowIfCanceled throw_if_canceled)
Definition PrintBase.hpp:169

References Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, Slic3r::PrintState< StepType, COUNT >::set_started(), Slic3r::PrintObjectBase::state_mutex(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::throw_if_canceled().

+ Here is the call graph for this function:

◆ state_mutex()

◆ status_update_warnings()

void Slic3r::PrintObjectBase::status_update_warnings ( PrintBase print,
int  step,
PrintStateBase::WarningLevel  warning_level,
const std::string &  message 
)
protectedinherited
121{
122 print->status_update_warnings(step, warning_level, message, this);
123}

References Slic3r::PrintBase::status_update_warnings().

Referenced by Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::active_step_add_warning(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_done().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step_state_with_timestamp()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
PrintStateBase::StateWithTimeStamp Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::step_state_with_timestamp ( PrintObjectStepEnum  step) const
inline
StateWithTimeStamp state_with_timestamp(StepType step, std::mutex &mtx) const
Definition PrintBase.hpp:118

References Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, Slic3r::PrintObjectBase::state_mutex(), and Slic3r::PrintState< StepType, COUNT >::state_with_timestamp().

+ Here is the call graph for this function:

◆ step_state_with_warnings()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
PrintStateBase::StateWithWarnings Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::step_state_with_warnings ( PrintObjectStepEnum  step) const
inline
StateWithWarnings state_with_warnings(StepType step, std::mutex &mtx) const
Definition PrintBase.hpp:124

References Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state, Slic3r::PrintObjectBase::state_mutex(), and Slic3r::PrintState< StepType, COUNT >::state_with_warnings().

Referenced by Slic3r::GUI::Plater::priv::on_slicing_update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ throw_if_canceled()

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
void Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::throw_if_canceled ( )
inlineprotected
803{ if (m_print->canceled()) throw CanceledException(); }

References Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print.

Referenced by Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_done(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_started().

+ Here is the caller graph for this function:

◆ timestamp()

virtual Timestamp Slic3r::ObjectBase::timestamp ( ) const
inlinevirtualinherited

Reimplemented in Slic3r::ModelConfigObject, and Slic3r::ObjectWithTimestamp.

60{ return 0; }

Referenced by Slic3r::GUI::Plater::priv::undo_redo_to().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_id

◆ m_model_object

◆ m_print

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
PrintType* Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_print
protected

Referenced by Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::active_step_add_warning(), Slic3r::SLAPrint::Steps::generate_preview_vdb(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_all_steps(), Slic3r::SLAPrintObject::invalidate_all_steps(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_step(), Slic3r::SLAPrintObject::invalidate_step(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_done(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::last_completed_step(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::print(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::print(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_done(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_started(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::step_state_with_timestamp(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::step_state_with_warnings(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::throw_if_canceled().

◆ m_state

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
PrintState<PrintObjectStepEnum, COUNT> Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::m_state
private

Referenced by Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::active_step_add_warning(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::enable_all_steps_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::enable_step_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::finalize_impl(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_all_steps(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_step(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::invalidate_steps(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_done(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_done_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_enabled_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::is_step_started_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::query_reset_dirty_step_unguarded(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_done(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::set_started(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::step_state_with_timestamp(), and Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::step_state_with_warnings().

◆ PrintObjectStepEnumSize

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
constexpr const size_t Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::PrintObjectStepEnumSize = COUNT
staticconstexpr

◆ PrintType

template<typename PrintType , typename PrintObjectStepEnumType , const size_t COUNT>
friend Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnumType, COUNT >::PrintType
protected

◆ s_last_id

size_t Slic3r::ObjectBase::s_last_id = 0
staticprivateinherited

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