LibrePCB Developers Documentation
Loading...
Searching...
No Matches
GerberAttribute Class Referencefinal

A Gerber X2 attribute. More...

#include <gerberattribute.h>

+ Collaboration diagram for GerberAttribute:

Public Types

enum class  Type
 
enum class  Polarity
 
enum class  BoardSide
 
enum class  CopperSide
 
enum class  MountType
 
enum class  ApertureFunction
 

Public Member Functions

 GerberAttribute () noexcept
 
 GerberAttribute (const GerberAttribute &other) noexcept
 
 ~GerberAttribute () noexcept
 
Type getType () const noexcept
 
const QString & getKey () const noexcept
 
const QStringList & getValues () const noexcept
 
QString toGerberString () const noexcept
 
QString toExcellonString () const noexcept
 
GerberAttributeoperator= (const GerberAttribute &rhs) noexcept
 
bool operator== (const GerberAttribute &rhs) const noexcept
 

Static Public Member Functions

static GerberAttribute unset (const QString &key) noexcept
 
static GerberAttribute fileGenerationSoftware (const QString &vendor, const QString &application, const QString &version) noexcept
 
static GerberAttribute fileCreationDate (const QDateTime &date) noexcept
 
static GerberAttribute fileProjectId (const QString &name, const Uuid &uuid, const QString &revision) noexcept
 
static GerberAttribute filePartSingle () noexcept
 
static GerberAttribute fileSameCoordinates (const QString &identifier) noexcept
 
static GerberAttribute fileFunctionProfile (bool plated) noexcept
 
static GerberAttribute fileFunctionCopper (int layer, CopperSide side) noexcept
 
static GerberAttribute fileFunctionSolderMask (BoardSide side) noexcept
 
static GerberAttribute fileFunctionLegend (BoardSide side) noexcept
 
static GerberAttribute fileFunctionPaste (BoardSide side) noexcept
 
static GerberAttribute fileFunctionPlatedThroughHole (int fromLayer, int toLayer) noexcept
 
static GerberAttribute fileFunctionNonPlatedThroughHole (int fromLayer, int toLayer) noexcept
 
static GerberAttribute fileFunctionMixedPlating (int fromLayer, int toLayer) noexcept
 
static GerberAttribute fileFunctionComponent (int layer, BoardSide side) noexcept
 
static GerberAttribute filePolarity (Polarity polarity) noexcept
 
static GerberAttribute fileMd5 (const QString &md5) noexcept
 
static GerberAttribute apertureFunction (ApertureFunction function) noexcept
 
static GerberAttribute apertureFunctionMixedPlatingDrill (bool plated, ApertureFunction function) noexcept
 
static GerberAttribute objectNet (const QString &net) noexcept
 
static GerberAttribute objectComponent (const QString &component) noexcept
 
static GerberAttribute objectPin (const QString &component, const QString &pin, const QString &signal) noexcept
 
static GerberAttribute componentRotation (const Angle &rotation) noexcept
 
static GerberAttribute componentManufacturer (const QString &manufacturer) noexcept
 
static GerberAttribute componentMpn (const QString &mpn) noexcept
 
static GerberAttribute componentValue (const QString &value) noexcept
 
static GerberAttribute componentMountType (MountType type) noexcept
 
static GerberAttribute componentFootprint (const QString &footprint) noexcept
 

Private Member Functions

 GerberAttribute (Type type, const QString &key, const QStringList &values) noexcept
 
QString toString () const noexcept
 

Static Private Member Functions

static QString escapeValue (const QString &value, bool strictAscii) noexcept
 

Private Attributes

Type mType
 
QString mKey
 
QStringList mValues
 

Detailed Description

A Gerber X2 attribute.

Member Enumeration Documentation

◆ Type

enum class Type
strong
Enumerator
Invalid 
File 
Aperture 
Object 
Delete 

◆ Polarity

enum class Polarity
strong
Enumerator
Positive 
Negative 

◆ BoardSide

enum class BoardSide
strong
Enumerator
Top 
Bottom 

◆ CopperSide

enum class CopperSide
strong
Enumerator
Top 
Inner 
Bottom 

◆ MountType

enum class MountType
strong
Enumerator
Tht 
Smt 
Fiducial 
Other 

◆ ApertureFunction

enum class ApertureFunction
strong
Enumerator
Profile 

Board outline.

ViaDrill 

Drill of a via (usually plated)

ComponentDrill 

Drill for component pads (usually plated)

ComponentDrillPressFit 

Drill for press-fit component pads (plated)

MechanicalDrill 

Drill for mechanical purpose (usually not plated)

Conductor 

Copper with electrical function.

NonConductor 

Copper without electrical function.

ComponentPad 

THT pad.

SmdPadCopperDefined 

SMT pad, copper-defined.

SmdPadSolderMaskDefined 

SMT pad, stopmask-defined.

BgaPadCopperDefined 

BGA pad, copper-defined.

BgaPadSolderMaskDefined 

BGA pad, stopmask-defined.

ConnectorPad 

Edge connector pad.

HeatsinkPad 

Heat sink or thermal pad.

ViaPad 

Via.

TestPad 

Test pad.

FiducialPadLocal 

Local fiducial pad.

FiducialPadGlobal 

Global fiducial pad.

ComponentMain 

Center of component.

ComponentPin 

Component pin.

ComponentOutlineBody 

Component body outline.

ComponentOutlineCourtyard 

Component courtyard outline.

Constructor & Destructor Documentation

◆ GerberAttribute() [1/3]

GerberAttribute ( )
noexcept
+ Here is the caller graph for this function:

◆ GerberAttribute() [2/3]

GerberAttribute ( const GerberAttribute other)
noexcept

◆ ~GerberAttribute()

~GerberAttribute ( )
noexcept

◆ GerberAttribute() [3/3]

GerberAttribute ( Type  type,
const QString &  key,
const QStringList &  values 
)
privatenoexcept

Member Function Documentation

◆ getType()

Type getType ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getKey()

const QString & getKey ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getValues()

const QStringList & getValues ( ) const
inlinenoexcept

◆ toGerberString()

QString toGerberString ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toExcellonString()

QString toExcellonString ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

GerberAttribute & operator= ( const GerberAttribute rhs)
noexcept

◆ operator==()

bool operator== ( const GerberAttribute rhs) const
noexcept

◆ unset()

GerberAttribute unset ( const QString &  key)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileGenerationSoftware()

GerberAttribute fileGenerationSoftware ( const QString &  vendor,
const QString &  application,
const QString &  version 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileCreationDate()

GerberAttribute fileCreationDate ( const QDateTime &  date)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileProjectId()

GerberAttribute fileProjectId ( const QString &  name,
const Uuid uuid,
const QString &  revision 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ filePartSingle()

GerberAttribute filePartSingle ( )
staticnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileSameCoordinates()

GerberAttribute fileSameCoordinates ( const QString &  identifier)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionProfile()

GerberAttribute fileFunctionProfile ( bool  plated)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionCopper()

GerberAttribute fileFunctionCopper ( int  layer,
CopperSide  side 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionSolderMask()

GerberAttribute fileFunctionSolderMask ( BoardSide  side)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionLegend()

GerberAttribute fileFunctionLegend ( BoardSide  side)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionPaste()

GerberAttribute fileFunctionPaste ( BoardSide  side)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionPlatedThroughHole()

GerberAttribute fileFunctionPlatedThroughHole ( int  fromLayer,
int  toLayer 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionNonPlatedThroughHole()

GerberAttribute fileFunctionNonPlatedThroughHole ( int  fromLayer,
int  toLayer 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionMixedPlating()

GerberAttribute fileFunctionMixedPlating ( int  fromLayer,
int  toLayer 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileFunctionComponent()

GerberAttribute fileFunctionComponent ( int  layer,
BoardSide  side 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ filePolarity()

GerberAttribute filePolarity ( Polarity  polarity)
staticnoexcept
+ Here is the caller graph for this function:

◆ fileMd5()

GerberAttribute fileMd5 ( const QString &  md5)
staticnoexcept
+ Here is the caller graph for this function:

◆ apertureFunction()

GerberAttribute apertureFunction ( ApertureFunction  function)
staticnoexcept
+ Here is the caller graph for this function:

◆ apertureFunctionMixedPlatingDrill()

GerberAttribute apertureFunctionMixedPlatingDrill ( bool  plated,
ApertureFunction  function 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ objectNet()

GerberAttribute objectNet ( const QString &  net)
staticnoexcept
+ Here is the caller graph for this function:

◆ objectComponent()

GerberAttribute objectComponent ( const QString &  component)
staticnoexcept
+ Here is the caller graph for this function:

◆ objectPin()

GerberAttribute objectPin ( const QString &  component,
const QString &  pin,
const QString &  signal 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ componentRotation()

GerberAttribute componentRotation ( const Angle rotation)
staticnoexcept
+ Here is the caller graph for this function:

◆ componentManufacturer()

GerberAttribute componentManufacturer ( const QString &  manufacturer)
staticnoexcept
+ Here is the caller graph for this function:

◆ componentMpn()

GerberAttribute componentMpn ( const QString &  mpn)
staticnoexcept
+ Here is the caller graph for this function:

◆ componentValue()

GerberAttribute componentValue ( const QString &  value)
staticnoexcept
+ Here is the caller graph for this function:

◆ componentMountType()

GerberAttribute componentMountType ( MountType  type)
staticnoexcept
+ Here is the caller graph for this function:

◆ componentFootprint()

GerberAttribute componentFootprint ( const QString &  footprint)
staticnoexcept
+ Here is the caller graph for this function:

◆ toString()

QString toString ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ escapeValue()

QString escapeValue ( const QString &  value,
bool  strictAscii 
)
staticprivatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mType

Type mType
private

◆ mKey

QString mKey
private

◆ mValues

QStringList mValues
private

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