KiCad PCB EDA Suite
GBR_METADATA Class Reference

Metadata which can be added in a gerber file as attribute in X2 format. More...

#include <gbr_metadata.h>

Public Member Functions

 GBR_METADATA ()
 
void SetApertureAttrib (GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB aApertAttribute)
 
GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB GetApertureAttrib ()
 
void SetNetAttribType (int aNetAttribType)
 
int GetNetAttribType () const
 
void SetNetName (const wxString &aNetname)
 
void SetPadName (const wxString &aPadname, bool aUseUTF8=false, bool aEscapeString=false)
 
void SetPadPinFunction (const wxString &aPadPinFunction, bool aUseUTF8, bool aEscapeString)
 
void SetCmpReference (const wxString &aComponentRef)
 
bool IsCopper ()
 Allowed attributes are not the same on board copper layers and on other layers. More...
 
void SetCopper (bool aValue)
 

Public Attributes

GBR_APERTURE_METADATA m_ApertureMetadata
 An item to handle aperture attribute. More...
 
GBR_NETLIST_METADATA m_NetlistMetadata
 An item to handle object attribute. More...
 

Private Attributes

bool m_isCopper
 If the metadata is relative to a copper layer or not, this flag which can be set/reset when an attribute for a given item depends on whether a copper layer or a non copper layer is plotted. More...
 

Detailed Description

Metadata which can be added in a gerber file as attribute in X2 format.

Definition at line 204 of file gbr_metadata.h.

Constructor & Destructor Documentation

◆ GBR_METADATA()

GBR_METADATA::GBR_METADATA ( )
inline

Definition at line 207 of file gbr_metadata.h.

207 : m_isCopper( false) {}
bool m_isCopper
If the metadata is relative to a copper layer or not, this flag which can be set/reset when an attrib...
Definition: gbr_metadata.h:270

Member Function Documentation

◆ GetApertureAttrib()

◆ GetNetAttribType()

int GBR_METADATA::GetNetAttribType ( ) const
inline

Definition at line 224 of file gbr_metadata.h.

225  {
227  }
GBR_NETLIST_METADATA m_NetlistMetadata
An item to handle object attribute.
Definition: gbr_metadata.h:262
int m_NetAttribType
the type of net info (used to define the gerber string to create)

References GBR_NETLIST_METADATA::m_NetAttribType, and m_NetlistMetadata.

◆ IsCopper()

bool GBR_METADATA::IsCopper ( )
inline

Allowed attributes are not the same on board copper layers and on other layers.

A flag can be set or reset when attributes can be depending on layers

Definition at line 251 of file gbr_metadata.h.

251 { return m_isCopper; }
bool m_isCopper
If the metadata is relative to a copper layer or not, this flag which can be set/reset when an attrib...
Definition: gbr_metadata.h:270

References m_isCopper.

◆ SetApertureAttrib()

◆ SetCmpReference()

void GBR_METADATA::SetCmpReference ( const wxString &  aComponentRef)
inline

Definition at line 241 of file gbr_metadata.h.

242  {
243  m_NetlistMetadata.m_Cmpref = aComponentRef;
244  }
wxString m_Cmpref
the component reference parent of the data
GBR_NETLIST_METADATA m_NetlistMetadata
An item to handle object attribute.
Definition: gbr_metadata.h:262

References GBR_NETLIST_METADATA::m_Cmpref, and m_NetlistMetadata.

Referenced by GERBER_WRITER::createDrillFile(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), and BRDITEMS_PLOTTER::PlotPad().

◆ SetCopper()

void GBR_METADATA::SetCopper ( bool  aValue)
inline

Definition at line 252 of file gbr_metadata.h.

252 { m_isCopper = aValue; }
bool m_isCopper
If the metadata is relative to a copper layer or not, this flag which can be set/reset when an attrib...
Definition: gbr_metadata.h:270

References m_isCopper.

Referenced by BRDITEMS_PLOTTER::PlotFilledAreas(), and BRDITEMS_PLOTTER::PlotPad().

◆ SetNetAttribType()

void GBR_METADATA::SetNetAttribType ( int  aNetAttribType)
inline

Definition at line 219 of file gbr_metadata.h.

220  {
221  m_NetlistMetadata.m_NetAttribType = aNetAttribType;
222  }
GBR_NETLIST_METADATA m_NetlistMetadata
An item to handle object attribute.
Definition: gbr_metadata.h:262
int m_NetAttribType
the type of net info (used to define the gerber string to create)

References GBR_NETLIST_METADATA::m_NetAttribType, and m_NetlistMetadata.

Referenced by GERBER_WRITER::createDrillFile(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), BRDITEMS_PLOTTER::PlotFilledAreas(), BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), BRDITEMS_PLOTTER::PlotPad(), and PlotStandardLayer().

◆ SetNetName()

void GBR_METADATA::SetNetName ( const wxString &  aNetname)
inline

Definition at line 229 of file gbr_metadata.h.

229 { m_NetlistMetadata.m_Netname = aNetname; }
wxString m_Netname
for items associated to a net: the netname
GBR_NETLIST_METADATA m_NetlistMetadata
An item to handle object attribute.
Definition: gbr_metadata.h:262

References m_NetlistMetadata, and GBR_NETLIST_METADATA::m_Netname.

Referenced by BRDITEMS_PLOTTER::PlotFilledAreas(), BRDITEMS_PLOTTER::PlotPad(), and PlotStandardLayer().

◆ SetPadName()

void GBR_METADATA::SetPadName ( const wxString &  aPadname,
bool  aUseUTF8 = false,
bool  aEscapeString = false 
)
inline

Definition at line 231 of file gbr_metadata.h.

232  {
233  m_NetlistMetadata.m_Padname.SetField( aPadname, aUseUTF8, aEscapeString );
234  }
void SetField(const wxString &aField, bool aUseUTF8, bool aEscapeString)
GBR_DATA_FIELD m_Padname
for a flashed pad: the pad name ((TO.P attribute)
GBR_NETLIST_METADATA m_NetlistMetadata
An item to handle object attribute.
Definition: gbr_metadata.h:262

References m_NetlistMetadata, GBR_NETLIST_METADATA::m_Padname, and GBR_DATA_FIELD::SetField().

Referenced by PLACEFILE_GERBER_WRITER::CreatePlaceFile(), and BRDITEMS_PLOTTER::PlotPad().

◆ SetPadPinFunction()

void GBR_METADATA::SetPadPinFunction ( const wxString &  aPadPinFunction,
bool  aUseUTF8,
bool  aEscapeString 
)
inline

Definition at line 236 of file gbr_metadata.h.

237  {
238  m_NetlistMetadata.m_PadPinFunction.SetField( aPadPinFunction, aUseUTF8, aEscapeString );
239  }
GBR_DATA_FIELD m_PadPinFunction
for a pad: the pin function (defined in schematic)
void SetField(const wxString &aField, bool aUseUTF8, bool aEscapeString)
GBR_NETLIST_METADATA m_NetlistMetadata
An item to handle object attribute.
Definition: gbr_metadata.h:262

References m_NetlistMetadata, GBR_NETLIST_METADATA::m_PadPinFunction, and GBR_DATA_FIELD::SetField().

Referenced by PLACEFILE_GERBER_WRITER::CreatePlaceFile(), and BRDITEMS_PLOTTER::PlotPad().

Member Data Documentation

◆ m_ApertureMetadata

GBR_APERTURE_METADATA GBR_METADATA::m_ApertureMetadata

An item to handle aperture attribute.

Definition at line 257 of file gbr_metadata.h.

Referenced by GERBER_PLOTTER::FlashPadRoundRect(), GetApertureAttrib(), GERBER_PLOTTER::PlotGerberRegion(), and SetApertureAttrib().

◆ m_isCopper

bool GBR_METADATA::m_isCopper
private

If the metadata is relative to a copper layer or not, this flag which can be set/reset when an attribute for a given item depends on whether a copper layer or a non copper layer is plotted.

The initial state i false.

Definition at line 270 of file gbr_metadata.h.

Referenced by IsCopper(), and SetCopper().

◆ m_NetlistMetadata


The documentation for this class was generated from the following file: