Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::VendorProfile Class Reference

#include <src/libslic3r/Preset.hpp>

+ Collaboration diagram for Slic3r::VendorProfile:

Classes

struct  PrinterModel
 
struct  PrinterVariant
 

Public Member Functions

 VendorProfile ()
 
 VendorProfile (std::string id)
 
bool valid () const
 
size_t num_variants () const
 
std::vector< std::string > families () const
 
bool operator< (const VendorProfile &rhs) const
 
bool operator== (const VendorProfile &rhs) const
 

Static Public Member Functions

static VendorProfile from_ini (const boost::filesystem::path &path, bool load_all=true)
 
static VendorProfile from_ini (const boost::property_tree::ptree &tree, const boost::filesystem::path &path, bool load_all=true)
 

Public Attributes

std::string name
 
std::string id
 
Semver config_version
 
std::string config_update_url
 
std::string changelog_url
 
bool templates_profile { false }
 
std::vector< PrinterModelmodels
 
std::set< std::string > default_filaments
 
std::set< std::string > default_sla_materials
 

Detailed Description

Constructor & Destructor Documentation

◆ VendorProfile() [1/2]

Slic3r::VendorProfile::VendorProfile ( )
inline
72{}

◆ VendorProfile() [2/2]

Slic3r::VendorProfile::VendorProfile ( std::string  id)
inline
73: id(std::move(id)) {}
std::string id
Definition Preset.hpp:33

Member Function Documentation

◆ families()

std::vector< std::string > Slic3r::VendorProfile::families ( ) const
231{
232 std::vector<std::string> res;
233 unsigned num_familiies = 0;
234
235 for (auto &model : models) {
236 if (std::find(res.begin(), res.end(), model.family) == res.end()) {
237 res.push_back(model.family);
238 num_familiies++;
239 }
240 }
241
242 return res;
243}
std::vector< PrinterModel > models
Definition Preset.hpp:67

References models.

Referenced by Slic3r::GUI::PagePrinters::PagePrinters().

+ Here is the caller graph for this function:

◆ from_ini() [1/2]

VendorProfile Slic3r::VendorProfile::from_ini ( const boost::filesystem::path &  path,
bool  load_all = true 
)
static
77{
78 ptree tree;
79 boost::nowide::ifstream ifs(path.string());
80 boost::property_tree::read_ini(ifs, tree);
81 return VendorProfile::from_ini(tree, path, load_all);
82}
static VendorProfile from_ini(const boost::filesystem::path &path, bool load_all=true)
Definition Preset.cpp:76

References from_ini().

Referenced by from_ini(), Slic3r::PresetUpdater::priv::get_config_updates(), Slic3r::PresetUpdater::install_bundles_rsrc_or_cache_vendor(), Slic3r::GUI::BundleMap::load(), Slic3r::PresetBundle::load_configbundle(), Slic3r::PresetUpdater::priv::perform_updates(), and Slic3r::PresetUpdater::priv::sync_config().

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

◆ from_ini() [2/2]

static VendorProfile Slic3r::VendorProfile::from_ini ( const boost::property_tree::ptree &  tree,
const boost::filesystem::path &  path,
bool  load_all = true 
)
static

◆ num_variants()

size_t Slic3r::VendorProfile::num_variants ( ) const
inline
82{ size_t n = 0; for (auto &model : models) n += model.variants.size(); return n; }
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183

References models.

Referenced by Slic3r::PresetBundle::load_configbundle().

+ Here is the caller graph for this function:

◆ operator<()

bool Slic3r::VendorProfile::operator< ( const VendorProfile rhs) const
inline
85{ return this->id < rhs.id; }

References id.

◆ operator==()

bool Slic3r::VendorProfile::operator== ( const VendorProfile rhs) const
inline
86{ return this->id == rhs.id; }

References id.

◆ valid()

bool Slic3r::VendorProfile::valid ( ) const
inline
75{ return ! name.empty() && ! id.empty() && config_version.valid(); }
bool valid() const
Definition Semver.hpp:150
std::string name
Definition Preset.hpp:32
Semver config_version
Definition Preset.hpp:34

References config_version, name, and Slic3r::Semver::valid().

Referenced by Slic3r::PresetUpdater::priv::get_config_updates().

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

Member Data Documentation

◆ changelog_url

std::string Slic3r::VendorProfile::changelog_url

◆ config_update_url

std::string Slic3r::VendorProfile::config_update_url

◆ config_version

◆ default_filaments

std::set<std::string> Slic3r::VendorProfile::default_filaments

◆ default_sla_materials

std::set<std::string> Slic3r::VendorProfile::default_sla_materials

◆ id

◆ models

◆ name

◆ templates_profile


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