KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GBR_DATA_FIELD Class Reference

A Gerber data field. More...

#include <gbr_netlist_metadata.h>

Public Member Functions

 GBR_DATA_FIELD ()
 
void clear ()
 
void Clear ()
 
const wxString & GetValue () const
 
void SetField (const wxString &aField, bool aUseUTF8, bool aEscapeString)
 
bool IsEmpty () const
 
std::string GetGerberString () const
 

Private Attributes

wxString m_field
 the Unicode text to print in Gbr file (after escape and quoting)
 
bool m_useUTF8
 true to use UTF8, false to escape non ASCII7 chars
 
bool m_escapeString
 true to quote the field in gbr file
 

Detailed Description

A Gerber data field.

This is a Unicode string with some chars converted in escaped hexadecimal sequence when creating the file. The following characters are always escaped because they are separator in Gerber files: * , \ %. Non ASCII7 characters can be converted to UTF8 or escaped.

Definition at line 99 of file gbr_netlist_metadata.h.

Constructor & Destructor Documentation

◆ GBR_DATA_FIELD()

GBR_DATA_FIELD::GBR_DATA_FIELD ( )
inline

Definition at line 102 of file gbr_netlist_metadata.h.

Member Function Documentation

◆ clear()

void GBR_DATA_FIELD::clear ( )
inline

Definition at line 105 of file gbr_netlist_metadata.h.

References m_escapeString, m_field, and m_useUTF8.

Referenced by Clear(), and GBR_NETLIST_METADATA::ClearAttribute().

◆ Clear()

void GBR_DATA_FIELD::Clear ( )
inline

Definition at line 112 of file gbr_netlist_metadata.h.

References clear().

Referenced by GERBER_FILE_IMAGE::ExecuteRS274XCommand().

◆ GetGerberString()

std::string GBR_DATA_FIELD::GetGerberString ( ) const

Definition at line 497 of file gbr_metadata.cpp.

References ConvertNotAllowedCharsInGerber(), m_escapeString, m_field, and m_useUTF8.

Referenced by FormatNetAttribute().

◆ GetValue()

const wxString & GBR_DATA_FIELD::GetValue ( ) const
inline

Definition at line 114 of file gbr_netlist_metadata.h.

References m_field.

Referenced by GERBER_DRAW_ITEM::GetMsgPanelInfo().

◆ IsEmpty()

bool GBR_DATA_FIELD::IsEmpty ( ) const
inline

Definition at line 123 of file gbr_netlist_metadata.h.

References m_field.

Referenced by FormatNetAttribute(), and GERBER_DRAW_ITEM::GetMsgPanelInfo().

◆ SetField()

void GBR_DATA_FIELD::SetField ( const wxString &  aField,
bool  aUseUTF8,
bool  aEscapeString 
)
inline

Member Data Documentation

◆ m_escapeString

bool GBR_DATA_FIELD::m_escapeString
private

true to quote the field in gbr file

Definition at line 131 of file gbr_netlist_metadata.h.

Referenced by clear(), GetGerberString(), and SetField().

◆ m_field

wxString GBR_DATA_FIELD::m_field
private

the Unicode text to print in Gbr file (after escape and quoting)

Definition at line 128 of file gbr_netlist_metadata.h.

Referenced by clear(), GetGerberString(), GetValue(), IsEmpty(), and SetField().

◆ m_useUTF8

bool GBR_DATA_FIELD::m_useUTF8
private

true to use UTF8, false to escape non ASCII7 chars

Definition at line 130 of file gbr_netlist_metadata.h.

Referenced by clear(), GetGerberString(), and SetField().


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