42 double xs = 0.0, ys = 0.0;
43 double xe = 0.0, ye = 0.0;
46 double x = 0.0, y = 0.0;
47 int apt_def_symbol_num = -1;
48 double apt_def_resize_factor = 0.0;
51 double xc = 0.0, yc = 0.0;
56 double xsize = 0.0, ysize = 0.0;
57 double width_factor = 0.0;
69 std::optional<unsigned int>
id;
72 double orient_def_rotation = 0.0;
78 typedef std::vector<std::shared_ptr<FeatureRecord>>
Vector;
81 std::unique_ptr<Odb::Lib::Protobuf::FeaturesFile::FeatureRecord> to_protobuf()
const override;
82 void from_protobuf(
const Odb::Lib::Protobuf::FeaturesFile::FeatureRecord& message)
override;
84 constexpr inline static const char* LINE_TOKEN =
"L";
85 constexpr inline static const char* PAD_TOKEN =
"P";
86 constexpr inline static const char* TEXT_TOKEN =
"T";
87 constexpr inline static const char* ARC_TOKEN =
"A";
88 constexpr inline static const char* BARCODE_TOKEN =
"B";
89 constexpr inline static const char* SURFACE_START_TOKEN =
"S";
90 constexpr inline static const char* SURFACE_END_TOKEN =
"SE";
93 bool Parse(std::filesystem::path directory,
const std::string& alternateFilename =
"");
95 bool Save(std::ostream& os)
override;
97 std::string GetUnits()
const;
98 std::filesystem::path GetPath();
99 std::filesystem::path GetDirectory();
100 int GetNumFeatures()
const;
101 unsigned int GetId()
const;
108 std::unique_ptr<Odb::Lib::Protobuf::FeaturesFile> to_protobuf()
const override;
113 std::unique_ptr<Odb::Lib::Protobuf::FeaturesFile> to_protobuf_skeleton()
const;
114 void from_protobuf(
const Odb::Lib::Protobuf::FeaturesFile& message)
override;
117 std::string m_units =
"";
118 std::filesystem::path m_path;
119 std::filesystem::path m_directory;
130 void FillSymbolNames(Odb::Lib::Protobuf::FeaturesFile& featuresFileMessage)
const;
133 std::vector<std::string> m_attributeNames;
134 std::vector<std::string> m_attributeTextValues;
136 constexpr inline static const char* FEATURES_FILENAMES[] =
143 constexpr inline static const char* UNITS_TOKEN =
"UNITS";
144 constexpr inline static const char* ID_TOKEN =
"ID";
145 constexpr inline static const char* ATTRIBUTE_NAME_TOKEN =
"@";
146 constexpr inline static const char* ATTRIBUTE_VALUE_TOKEN =
"&";
147 constexpr inline static const char* SYMBOL_NAME_TOKEN =
"$";
148 constexpr inline static const char* COMMENT_TOKEN =
"#";
149 constexpr inline static const char* NUM_FEATURES_TOKEN =
"F";