#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Config/Snapshot.hpp>
Public Types | |
| typedef std::vector< Snapshot >::const_iterator | const_iterator |
Public Member Functions | |
| size_t | load_db () |
| void | update_slic3r_versions (std::vector< Index > &index_db) |
| const Snapshot & | take_snapshot (const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment="") |
| const Snapshot & | restore_snapshot (const std::string &id, AppConfig &app_config) |
| void | restore_snapshot (const Snapshot &snapshot, AppConfig &app_config) |
| bool | is_on_snapshot (AppConfig &app_config) const |
| const_iterator | snapshot_with_vendor_preset (const std::string &vendor_name, const Semver &config_version) |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | snapshot (const std::string &id) const |
| const std::vector< Snapshot > & | snapshots () const |
Static Public Member Functions | |
| static SnapshotDB & | singleton () |
Static Private Member Functions | |
| static boost::filesystem::path | create_db_dir () |
Private Attributes | |
| std::vector< Snapshot > | m_snapshots |
| typedef std::vector<Snapshot>::const_iterator Slic3r::GUI::Config::SnapshotDB::const_iterator |
|
inline |
References m_snapshots.
|
staticprivate |
References Slic3r::data_dir(), and SLIC3R_SNAPSHOTS_DIR.
Referenced by load_db(), restore_snapshot(), and take_snapshot().
|
inline |
| bool Slic3r::GUI::Config::SnapshotDB::is_on_snapshot | ( | AppConfig & | app_config | ) | const |
References end(), Slic3r::AppConfig::get(), Slic3r::AppConfig::set(), and snapshot().
| size_t Slic3r::GUI::Config::SnapshotDB::load_db | ( | ) |
References create_db_dir(), m_snapshots, SLIC3R_SNAPSHOT_FILE, and snapshot().
Referenced by singleton().
| void Slic3r::GUI::Config::SnapshotDB::restore_snapshot | ( | const Snapshot & | snapshot, |
| AppConfig & | app_config ) |
References Slic3r::GUI::Config::copy_config_dir_single_level(), create_db_dir(), Slic3r::data_dir(), Slic3r::GUI::Config::delete_existing_ini_files(), snapshot(), and Slic3r::GUI::Config::snapshot_subdirs.
| const Snapshot & Slic3r::GUI::Config::SnapshotDB::restore_snapshot | ( | const std::string & | id, |
| AppConfig & | app_config ) |
References m_snapshots, restore_snapshot(), and snapshot().
Referenced by restore_snapshot().
|
static |
References Slic3r::GUI::Config::Index::load_db(), load_db(), and update_slic3r_versions().
Referenced by Slic3r::GUI::Config::take_config_snapshot_cancel_on_error(), and Slic3r::GUI::Config::take_config_snapshot_report_error().
| SnapshotDB::const_iterator Slic3r::GUI::Config::SnapshotDB::snapshot | ( | const std::string & | id | ) | const |
References m_snapshots.
Referenced by is_on_snapshot(), load_db(), restore_snapshot(), restore_snapshot(), snapshot_with_vendor_preset(), take_snapshot(), and update_slic3r_versions().
| SnapshotDB::const_iterator Slic3r::GUI::Config::SnapshotDB::snapshot_with_vendor_preset | ( | const std::string & | vendor_name, |
| const Semver & | config_version ) |
References m_snapshots, Slic3r::GUI::Config::Snapshot::VendorConfig::name, and snapshot().
|
inline |
References m_snapshots.
| const Snapshot & Slic3r::GUI::Config::SnapshotDB::take_snapshot | ( | const AppConfig & | app_config, |
| Snapshot::Reason | reason, | ||
| const std::string & | comment = "" ) |
References Slic3r::GUI::Config::Version::config_version, Slic3r::GUI::Config::copy_config_dir_single_level(), create_db_dir(), Slic3r::data_dir(), Slic3r::AppConfig::get(), Slic3r::Utils::get_current_time_utc(), Slic3r::AppConfig::has(), Slic3r::installed_vendor_version(), Slic3r::Utils::iso_utc_timestamp(), m_snapshots, Slic3r::GUI::Config::Snapshot::VendorConfig::models_variants_installed, Slic3r::GUI::Config::Snapshot::VendorConfig::name, PRESET_FILAMENT_NAME, PRESET_PRINT_NAME, PRESET_PRINTER_NAME, Slic3r::SEMVER, snapshot(), Slic3r::GUI::Config::snapshot_subdirs, Slic3r::AppConfig::vendors(), and Slic3r::GUI::Config::Snapshot::VendorConfig::version.
Referenced by Slic3r::GUI::Config::take_config_snapshot_cancel_on_error(), and Slic3r::GUI::Config::take_config_snapshot_report_error().
| void Slic3r::GUI::Config::SnapshotDB::update_slic3r_versions | ( | std::vector< Index > & | index_db | ) |
References Slic3r::GUI::Config::Version::config_version, m_snapshots, Slic3r::GUI::Config::Version::max_slic3r_version, Slic3r::GUI::Config::Version::min_slic3r_version, snapshot(), and Slic3r::GUI::Config::Snapshot::VendorConfig::version.
Referenced by singleton().
|
private |
Referenced by begin(), end(), load_db(), restore_snapshot(), snapshot(), snapshot_with_vendor_preset(), snapshots(), take_snapshot(), and update_slic3r_versions().