OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::VendorProfile Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Preset.hpp>

Collaboration diagram for Slic3r::VendorProfile:

Classes

struct  PrinterVariant
struct  PrinterModel

Public Member Functions

 VendorProfile ()
 VendorProfile (std::string id)
bool valid () const
template<class Archive>
void serialize (Archive &ar)
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
std::vector< PrinterModel > models
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
198{}

Referenced by from_ini(), from_ini(), operator<(), and operator==().

Here is the caller graph for this function:

◆ VendorProfile() [2/2]

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

References id.

Member Function Documentation

◆ families()

std::vector< std::string > Slic3r::VendorProfile::families ( ) const
489{
490 std::vector<std::string> res;
491 unsigned num_familiies = 0;
492
493 for (auto &model : models) {
494 if (std::find(res.begin(), res.end(), model.family) == res.end()) {
495 res.push_back(model.family);
496 num_familiies++;
497 }
498 }
499
500 return res;
501}
std::vector< PrinterModel > models
Definition Preset.hpp:193

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
282{
283 ptree tree;
284 boost::filesystem::ifstream ifs(path);
285 boost::property_tree::read_ini(ifs, tree);
286 return VendorProfile::from_ini(tree, path, load_all);
287}
static VendorProfile from_ini(const boost::filesystem::path &path, bool load_all=true)
Definition Preset.cpp:281

References VendorProfile(), and from_ini().

Referenced by from_ini().

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

◆ from_ini() [2/2]

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

References VendorProfile().

Here is the call graph for this function:

◆ num_variants()

size_t Slic3r::VendorProfile::num_variants ( ) const
inline
216{ size_t n = 0; for (auto &model : models) n += model.variants.size(); return n; }

References models.

◆ operator<()

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

References VendorProfile(), and id.

Here is the call graph for this function:

◆ operator==()

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

References VendorProfile(), and id.

Here is the call graph for this function:

◆ serialize()

template<class Archive>
void Slic3r::VendorProfile::serialize ( Archive & ar)
inline
206 {
209 }
std::string name
Definition Preset.hpp:136
std::set< std::string > default_filaments
Definition Preset.hpp:195
std::string config_update_url
Definition Preset.hpp:139
std::string changelog_url
Definition Preset.hpp:140
Semver config_version
Definition Preset.hpp:138
std::set< std::string > default_sla_materials
Definition Preset.hpp:196

References changelog_url, config_update_url, config_version, default_filaments, default_sla_materials, models, and name.

◆ valid()

bool Slic3r::VendorProfile::valid ( ) const
inline
201{ return ! name.empty() && ! id.empty() && config_version.valid(); }

References config_version, and name.

Member Data Documentation

◆ changelog_url

std::string Slic3r::VendorProfile::changelog_url

Referenced by serialize().

◆ config_update_url

std::string Slic3r::VendorProfile::config_update_url

◆ config_version

◆ default_filaments

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

Referenced by serialize().

◆ default_sla_materials

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

Referenced by serialize().

◆ id

◆ models

◆ name


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