LibrePCB Developers Documentation
GerberAttribute Class Referencefinal

A Gerber X2 attribute. More...

#include <gerberattribute.h>

+ Collaboration diagram for GerberAttribute:

Public Types

enum  Type
 
enum  Polarity
 
enum  BoardSide
 
enum  CopperSide
 
enum  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 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
 

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) noexcept
 

Private Attributes

Type mType
 
QString mKey
 
QStringList mValues
 

Detailed Description

A Gerber X2 attribute.

Member Enumeration Documentation

◆ Type

enum Type
strong
Enumerator
Invalid 
File 
Aperture 
Object 
Delete 

◆ Polarity

enum Polarity
strong
Enumerator
Positive 
Negative 

◆ BoardSide

enum BoardSide
strong
Enumerator
Top 
Bottom 

◆ CopperSide

enum CopperSide
strong
Enumerator
Top 
Inner 
Bottom 

◆ ApertureFunction

enum ApertureFunction
strong
Enumerator
Profile 

Board outline.

ViaDrill 

Drill of a via (usually plated)

ComponentDrill 

Drill for component pads (usually 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.

ViaPad 

Via.

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
+ Here is the call graph for this function:

◆ 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
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const GerberAttribute rhs) const
noexcept
+ Here is the caller graph for this function:

◆ unset()

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

◆ fileGenerationSoftware()

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

◆ fileCreationDate()

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

◆ fileProjectId()

GerberAttribute fileProjectId ( const QString &  name,
const Uuid uuid,
const QString &  revision 
)
staticnoexcept
+ Here is the call graph for this function:
+ 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 call graph for this function:
+ Here is the caller graph for this function:

◆ fileFunctionProfile()

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

◆ fileFunctionCopper()

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

◆ fileFunctionSolderMask()

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

◆ fileFunctionLegend()

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

◆ fileFunctionPaste()

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

◆ fileFunctionPlatedThroughHole()

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

◆ fileFunctionNonPlatedThroughHole()

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

◆ fileFunctionMixedPlating()

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

◆ filePolarity()

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

◆ fileMd5()

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

◆ apertureFunction()

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

◆ apertureFunctionMixedPlatingDrill()

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

◆ objectNet()

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

◆ objectComponent()

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

◆ objectPin()

GerberAttribute objectPin ( const QString &  component,
const QString &  pin,
const QString &  signal 
)
staticnoexcept
+ Here is the call graph for this function:
+ 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)
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: