56 inline static const char* RECORD_TOKEN =
"TOOLS";
58 inline static const char* NUM_KEY =
"NUM";
59 inline static const char* TYPE_KEY =
"TYPE";
60 inline static const char* TYPE2_KEY =
"TYPE2";
61 inline static const char* MIN_TOL_KEY =
"MIN_TOL";
62 inline static const char* MAX_TOL_KEY =
"MAX_TOL";
63 inline static const char* BIT_KEY =
"BIT";
64 inline static const char* FINISH_SIZE_KEY =
"FINISH_SIZE";
65 inline static const char* DRILL_SIZE_KEY =
"DRILL_SIZE";
68 std::unique_ptr<Odb::Lib::Protobuf::ToolsFile::ToolsRecord> to_protobuf()
const override;
69 void from_protobuf(
const Odb::Lib::Protobuf::ToolsFile::ToolsRecord& message)
override;
71 inline static const Utils::EnumMap<Type> typeMap{
79 inline static const Utils::EnumMap<Type2> type2Map{
91 typedef std::map<unsigned int, std::shared_ptr<ToolsRecord>> ToolsMap;
93 std::string GetUnits()
const;
94 double GetThickness()
const;
95 std::string GetUserParams()
const;
96 const ToolsMap& GetTools()
const;
98 bool Parse(std::filesystem::path directory);
100 bool Save(std::ostream& os)
override;
103 std::unique_ptr<Odb::Lib::Protobuf::ToolsFile> to_protobuf()
const override;
104 void from_protobuf(
const Odb::Lib::Protobuf::ToolsFile& message)
override;
107 std::filesystem::path m_directory;
108 std::filesystem::path m_path;
112 std::string m_user_params;
113 ToolsMap m_toolsByNum;
115 inline static const auto TOOLS_FILENAMES = {
"tools" };
117 inline static const char* UNITS_TOKEN =
"UNITS";
118 inline static const char* THICKNESS_TOKEN =
"THICKNESS";
119 inline static const char* USER_PARAMS_TOKEN =
"USER_PARAMS";