56 double finishSize = -1.0;
58 double drillSize = -1.0;
61 constexpr inline static const char* TYPE_PLATED =
"PLATED";
62 constexpr inline static const char* TYPE_NON_PLATED =
"NON_PLATED";
63 constexpr inline static const char* TYPE_VIA =
"VIA";
64 constexpr inline static const char* SUB_TYPE_STANDARD =
"STANDARD";
65 constexpr inline static const char* SUB_TYPE_PRESS_FIT =
"PRESS_FIT";
66 constexpr inline static const char* SUB_TYPE_PHOTO =
"PHOTO";
67 constexpr inline static const char* SUB_TYPE_LASER =
"LASER";
71 bool subTypeIsLegal()
const;
74 static const char* typeName(
Type type);
75 static const char* subTypeName(
SubType subType);
78 typedef std::vector<std::shared_ptr<ToolRecord>>
Vector;
79 typedef std::map<unsigned int, std::shared_ptr<ToolRecord>>
NumMap;
82 std::unique_ptr<Odb::Lib::Protobuf::ToolsFile::Tool> to_protobuf()
const override;
83 void from_protobuf(
const Odb::Lib::Protobuf::ToolsFile::Tool& message)
override;
86 bool Parse(std::filesystem::path directory);
88 bool Save(std::ostream& os)
override;
90 std::string GetUnits()
const;
91 double GetThickness()
const;
92 const std::vector<std::string>& GetUserParams()
const;
94 std::filesystem::path GetPath()
const;
97 std::unique_ptr<Odb::Lib::Protobuf::ToolsFile> to_protobuf()
const override;
98 void from_protobuf(
const Odb::Lib::Protobuf::ToolsFile& message)
override;
100 constexpr inline static const char* TOOLS_FILENAME =
"tools";
101 constexpr inline static const char* TOOLS_ARRAY_TOKEN =
"TOOLS";
102 constexpr inline static const char* THICKNESS_KEY =
"THICKNESS";
103 constexpr inline static const char* USER_PARAMS_KEY =
"USER_PARAMS";
104 constexpr inline static const char* NUM_KEY =
"NUM";
105 constexpr inline static const char* TYPE_KEY =
"TYPE";
106 constexpr inline static const char* TYPE2_KEY =
"TYPE2";
107 constexpr inline static const char* MIN_TOL_KEY =
"MIN_TOL";
108 constexpr inline static const char* MAX_TOL_KEY =
"MAX_TOL";
109 constexpr inline static const char* BIT_KEY =
"BIT";
110 constexpr inline static const char* FINISH_SIZE_KEY =
"FINISH_SIZE";
111 constexpr inline static const char* DRILL_SIZE_KEY =
"DRILL_SIZE";
114 std::filesystem::path m_path;
115 std::filesystem::path m_directory;
117 double m_thickness = 0.0;
118 std::vector<std::string> m_userParams;