Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::ModelObjectStatusDB Struct Reference
+ Collaboration diagram for Slic3r::ModelObjectStatusDB:

Public Member Functions

void add (const ModelObject &model_object, const ModelObjectStatus::Status status)
 
bool add_if_new (const ModelObject &model_object, const ModelObjectStatus::Status status)
 
const ModelObjectStatusget (const ModelObject &model_object)
 
const ModelObjectStatusreuse (const ModelObject &model_object)
 

Public Attributes

std::set< ModelObjectStatusdb
 

Detailed Description

Member Function Documentation

◆ add()

void Slic3r::ModelObjectStatusDB::add ( const ModelObject model_object,
const ModelObjectStatus::Status  status 
)
inline
354 {
355 assert(db.find(ModelObjectStatus(model_object.id())) == db.end());
356 db.emplace(model_object.id(), status);
357 }
std::set< ModelObjectStatus > db
Definition PrintApply.cpp:380

References Slic3r::ObjectBase::id().

Referenced by Slic3r::Print::apply().

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

◆ add_if_new()

bool Slic3r::ModelObjectStatusDB::add_if_new ( const ModelObject model_object,
const ModelObjectStatus::Status  status 
)
inline
359 {
360 auto it = db.find(ModelObjectStatus(model_object.id()));
361 if (it == db.end()) {
362 db.emplace_hint(it, model_object.id(), status);
363 return true;
364 }
365 return false;
366 }

References Slic3r::ObjectBase::id().

Referenced by Slic3r::Print::apply().

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

◆ get()

const ModelObjectStatus & Slic3r::ModelObjectStatusDB::get ( const ModelObject model_object)
inline
368 {
369 auto it = db.find(ModelObjectStatus(model_object.id()));
370 assert(it != db.end());
371 return *it;
372 }

References Slic3r::ObjectBase::id().

Referenced by Slic3r::Print::apply().

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

◆ reuse()

const ModelObjectStatus & Slic3r::ModelObjectStatusDB::reuse ( const ModelObject model_object)
inline
374 {
375 const ModelObjectStatus &result = this->get(model_object);
376 assert(result.status != ModelObjectStatus::Deleted);
377 return result;
378 }
const ModelObjectStatus & get(const ModelObject &model_object)
Definition PrintApply.cpp:368
@ Deleted
Definition PrintApply.cpp:325

References Slic3r::ModelObjectStatus::status.

Referenced by Slic3r::Print::apply().

+ Here is the caller graph for this function:

Member Data Documentation

◆ db

std::set<ModelObjectStatus> Slic3r::ModelObjectStatusDB::db

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