45 : m_color(Constant<RGBColor>::Invalid)
46 , m_line_type_scale(1.0)
48 , m_in_paper_space(
false)
51 DXFAttributes(
const String& layer,
const RGBColor& color,
int width,
String linetype,
double linetypeScale)
54 , m_line_type(std::move(linetype))
55 , m_line_type_scale(linetypeScale)
57 , m_in_paper_space(
false)
61 : m_layer(std::move(layer))
63 , m_line_type(std::move(linetype))
64 , m_line_type_scale(1.0)
65 , m_handle(std::move(handle))
67 , m_in_paper_space(
false)
70 bool operator==(
const DXFAttributes& attributes)
const
72 return m_layer == attributes.m_layer
73 && m_color == attributes.m_color
74 && m_block == attributes.m_block
75 && m_line_type == attributes.m_line_type
76 && m_line_type_scale == attributes.m_line_type_scale
77 && m_handle == attributes.m_handle
78 && m_width == attributes.m_width
79 && m_in_paper_space == attributes.m_in_paper_space;
81 bool operator!=(
const DXFAttributes& attributes)
const
83 return m_layer != attributes.m_layer
84 || m_color != attributes.m_color
85 || m_block != attributes.m_block
86 || m_line_type != attributes.m_line_type
87 || m_line_type_scale != attributes.m_line_type_scale
88 || m_handle != attributes.m_handle
89 || m_width != attributes.m_width
90 || m_in_paper_space != attributes.m_in_paper_space;
93 void setLayer(
const String& layer) { m_layer = layer; }
94 [[nodiscard]]
const String& getLayer()
const {
return m_layer; }
96 void setBlock(
const String& block) { m_block = block; }
97 [[nodiscard]]
const String& block()
const {
return m_block; }
99 void setColor(
const RGBColor& color) { m_color = color; }
101 const RGBColor& getColor()
const {
return m_color; }
103 void setWidth(
int width) { m_width = width; }
105 int getWidth()
const {
return m_width; }
107 void setLinetype(
const String& linetype) { m_line_type = linetype; }
109 void setLinetypeScale(
double linetypeScale) { m_line_type_scale = linetypeScale; }
111 double getLinetypeScale()
const {
return m_line_type_scale; }
112 const String& getLinetype()
const
114 static const String by_layer(
"BYLAYER");
115 return m_line_type.size() == 0 ? by_layer : m_line_type;
118 void setHandle(
const String& h) { m_handle = h; }
119 [[nodiscard]]
const String& handle()
const {
return m_handle; }
121 void setInPaperSpace(
bool on) { m_in_paper_space = on; }
122 bool isInPaperSpace()
const {
return m_in_paper_space; }
124 void setSection(
const String& h) { m_section = h; }
125 const String& section()
const {
return m_section; }
136 bool m_in_paper_space;