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

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/DeviceCore/DevHMS.h>

Collaboration diagram for Slic3r::DevHMS:

Public Member Functions

 DevHMS (MachineObject *obj)
void ParseHMSItems (const nlohmann::json &hms_json)
const std::vector< DevHMSItem > & GetHMSItems () const

Private Attributes

MachineObject * m_object = nullptr
std::vector< DevHMSItem > m_hms_list

Detailed Description

Constructor & Destructor Documentation

◆ DevHMS()

Slic3r::DevHMS::DevHMS ( MachineObject * obj)
inline
18: m_object(obj) {}
MachineObject * m_object
Definition DevHMS.h:25

References m_object.

Member Function Documentation

◆ GetHMSItems()

const std::vector< DevHMSItem > & Slic3r::DevHMS::GetHMSItems ( ) const
inline
22{ return m_hms_list; };
std::vector< DevHMSItem > m_hms_list
Definition DevHMS.h:28

References m_hms_list.

◆ ParseHMSItems()

void Slic3r::DevHMS::ParseHMSItems ( const nlohmann::json & hms_json)
50{
51 m_hms_list.clear();
52
53 try
54 {
55 if (hms_json.is_array())
56 {
57 for (auto it = hms_json.begin(); it != hms_json.end(); it++)
58 {
59 DevHMSItem item;
60 if ((*it).contains("attr") && (*it).contains("code"))
61 {
62 unsigned attr = (*it)["attr"].get<unsigned>();
63 unsigned code = (*it)["code"].get<unsigned>();
64 item.parse_hms_info(attr, code);
65 }
66 m_hms_list.push_back(item);
67 }
68 }
69 }
70 catch (const std::exception&)
71 {
72 assert(false && "Parse HMS items failed");
73 }
74}

References m_hms_list, and Slic3r::DevHMSItem::parse_hms_info().

Here is the call graph for this function:

Member Data Documentation

◆ m_hms_list

std::vector<DevHMSItem> Slic3r::DevHMS::m_hms_list
private

Referenced by GetHMSItems(), and ParseHMSItems().

◆ m_object

MachineObject* Slic3r::DevHMS::m_object = nullptr
private

Referenced by DevHMS().


The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/DeviceCore/DevHMS.h
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/DeviceCore/DevHMS.cpp