LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Footprint Class Referencefinal

The Footprint class represents one footprint variant of a package. More...

#include <footprint.h>

+ Inheritance diagram for Footprint:
+ Collaboration diagram for Footprint:

Public Member Functions

 Footprint ()=delete
 
 Footprint (const Footprint &other) noexcept
 
 Footprint (const Uuid &uuid, const ElementName &name_en_US, const QString &description_en_US)
 
 Footprint (const SExpression &node)
 
 ~Footprint () noexcept
 
const UuidgetUuid () const noexcept
 
LocalizedNameMapgetNames () noexcept
 
const LocalizedNameMapgetNames () const noexcept
 
LocalizedDescriptionMapgetDescriptions () noexcept
 
const LocalizedDescriptionMapgetDescriptions () const noexcept
 
const FootprintPadListgetPads () const noexcept
 
FootprintPadListgetPads () noexcept
 
const PolygonListgetPolygons () const noexcept
 
PolygonListgetPolygons () noexcept
 
const CircleListgetCircles () const noexcept
 
CircleListgetCircles () noexcept
 
const StrokeTextListgetStrokeTexts () const noexcept
 
StrokeTextListgetStrokeTexts () noexcept
 
const HoleListgetHoles () const noexcept
 
HoleListgetHoles () noexcept
 
void setStrokeFontForAllTexts (const StrokeFont *font) noexcept
 
void registerGraphicsItem (FootprintGraphicsItem &item) noexcept
 
void unregisterGraphicsItem (FootprintGraphicsItem &item) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const Footprint &rhs) const noexcept
 
bool operator!= (const Footprint &rhs) const noexcept
 
Footprintoperator= (const Footprint &rhs) noexcept
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

Private Member Functions

void listObjectAdded (const FootprintPadList &list, int newIndex, const std::shared_ptr< FootprintPad > &ptr) noexceptoverride
 
void listObjectAdded (const PolygonList &list, int newIndex, const std::shared_ptr< Polygon > &ptr) noexceptoverride
 
void listObjectAdded (const CircleList &list, int newIndex, const std::shared_ptr< Circle > &ptr) noexceptoverride
 
void listObjectAdded (const StrokeTextList &list, int newIndex, const std::shared_ptr< StrokeText > &ptr) noexceptoverride
 
void listObjectAdded (const HoleList &list, int newIndex, const std::shared_ptr< Hole > &ptr) noexceptoverride
 
void listObjectRemoved (const FootprintPadList &list, int oldIndex, const std::shared_ptr< FootprintPad > &ptr) noexceptoverride
 
void listObjectRemoved (const PolygonList &list, int oldIndex, const std::shared_ptr< Polygon > &ptr) noexceptoverride
 
void listObjectRemoved (const CircleList &list, int oldIndex, const std::shared_ptr< Circle > &ptr) noexceptoverride
 
void listObjectRemoved (const StrokeTextList &list, int oldIndex, const std::shared_ptr< StrokeText > &ptr) noexceptoverride
 
void listObjectRemoved (const HoleList &list, int oldIndex, const std::shared_ptr< Hole > &ptr) noexceptoverride
 
- Private Member Functions inherited from SerializableObjectList< T, P >::IF_Observer
virtual void listObjectAdded (const SerializableObjectList< T, P > &list, int newIndex, const std::shared_ptr< T > &ptr) noexcept=0
 
virtual void listObjectRemoved (const SerializableObjectList< T, P > &list, int oldIndex, const std::shared_ptr< T > &ptr) noexcept=0
 

Private Attributes

Uuid mUuid
 
LocalizedNameMap mNames
 
LocalizedDescriptionMap mDescriptions
 
FootprintPadList mPads
 
PolygonList mPolygons
 
CircleList mCircles
 
StrokeTextList mStrokeTexts
 
HoleList mHoles
 
const StrokeFontmStrokeFont
 
FootprintGraphicsItemmRegisteredGraphicsItem
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

Detailed Description

The Footprint class represents one footprint variant of a package.

Following information is considered as the "interface" of a footprint and must therefore never be changed:

  • UUID
  • Footprint pads (neither adding nor removing pads is allowed)
    • UUID

Constructor & Destructor Documentation

Footprint ( )
delete
Footprint ( const Footprint other)
noexcept
Footprint ( const Uuid uuid,
const ElementName name_en_US,
const QString &  description_en_US 
)
Footprint ( const SExpression node)
explicit

+ Here is the call graph for this function:

~Footprint ( )
noexcept

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

LocalizedNameMap& getNames ( )
inlinenoexcept

+ Here is the caller graph for this function:

const LocalizedNameMap& getNames ( ) const
inlinenoexcept
LocalizedDescriptionMap& getDescriptions ( )
inlinenoexcept

+ Here is the caller graph for this function:

const LocalizedDescriptionMap& getDescriptions ( ) const
inlinenoexcept
const FootprintPadList& getPads ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

FootprintPadList& getPads ( )
inlinenoexcept
const PolygonList& getPolygons ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

PolygonList& getPolygons ( )
inlinenoexcept
const CircleList& getCircles ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

CircleList& getCircles ( )
inlinenoexcept
const StrokeTextList& getStrokeTexts ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

StrokeTextList& getStrokeTexts ( )
inlinenoexcept
const HoleList& getHoles ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

HoleList& getHoles ( )
inlinenoexcept
void setStrokeFontForAllTexts ( const StrokeFont font)
noexcept
void registerGraphicsItem ( FootprintGraphicsItem item)
noexcept
void unregisterGraphicsItem ( FootprintGraphicsItem item)
noexcept

+ Here is the caller graph for this function:

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:

bool operator== ( const Footprint rhs) const
noexcept
bool operator!= ( const Footprint rhs) const
inlinenoexcept
Footprint & operator= ( const Footprint rhs)
noexcept
void listObjectAdded ( const FootprintPadList list,
int  newIndex,
const std::shared_ptr< FootprintPad > &  ptr 
)
overrideprivatenoexcept
void listObjectAdded ( const PolygonList list,
int  newIndex,
const std::shared_ptr< Polygon > &  ptr 
)
overrideprivatenoexcept
void listObjectAdded ( const CircleList list,
int  newIndex,
const std::shared_ptr< Circle > &  ptr 
)
overrideprivatenoexcept
void listObjectAdded ( const StrokeTextList list,
int  newIndex,
const std::shared_ptr< StrokeText > &  ptr 
)
overrideprivatenoexcept
void listObjectAdded ( const HoleList list,
int  newIndex,
const std::shared_ptr< Hole > &  ptr 
)
overrideprivatenoexcept
void listObjectRemoved ( const FootprintPadList list,
int  oldIndex,
const std::shared_ptr< FootprintPad > &  ptr 
)
overrideprivatenoexcept
void listObjectRemoved ( const PolygonList list,
int  oldIndex,
const std::shared_ptr< Polygon > &  ptr 
)
overrideprivatenoexcept
void listObjectRemoved ( const CircleList list,
int  oldIndex,
const std::shared_ptr< Circle > &  ptr 
)
overrideprivatenoexcept
void listObjectRemoved ( const StrokeTextList list,
int  oldIndex,
const std::shared_ptr< StrokeText > &  ptr 
)
overrideprivatenoexcept
void listObjectRemoved ( const HoleList list,
int  oldIndex,
const std::shared_ptr< Hole > &  ptr 
)
overrideprivatenoexcept

Member Data Documentation

Uuid mUuid
private
LocalizedNameMap mNames
private
LocalizedDescriptionMap mDescriptions
private
FootprintPadList mPads
private
PolygonList mPolygons
private
CircleList mCircles
private
StrokeTextList mStrokeTexts
private
HoleList mHoles
private
const StrokeFont* mStrokeFont
private
FootprintGraphicsItem* mRegisteredGraphicsItem
private

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