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

The ComponentSymbolVariantItem class represents one symbol of a component symbol variant. More...

#include <componentsymbolvariantitem.h>

+ Inheritance diagram for ComponentSymbolVariantItem:
+ Collaboration diagram for ComponentSymbolVariantItem:

Public Member Functions

 ComponentSymbolVariantItem ()=delete
 
 ComponentSymbolVariantItem (const ComponentSymbolVariantItem &other) noexcept
 
 ComponentSymbolVariantItem (const Uuid &uuid, const Uuid &symbolUuid, const Point &symbolPos, const Angle &symbolRotation, bool isRequired, const ComponentSymbolVariantItemSuffix &suffix) noexcept
 
 ComponentSymbolVariantItem (const SExpression &node)
 
 ~ComponentSymbolVariantItem () noexcept
 
const UuidgetUuid () const noexcept
 
const UuidgetSymbolUuid () const noexcept
 
const PointgetSymbolPosition () const noexcept
 
const AnglegetSymbolRotation () const noexcept
 
bool isRequired () const noexcept
 
const
ComponentSymbolVariantItemSuffix
getSuffix () const noexcept
 
void setSymbolUuid (const Uuid &uuid) noexcept
 
void setSymbolPosition (const Point &pos) noexcept
 
void setSymbolRotation (const Angle &rot) noexcept
 
void setIsRequired (bool required) noexcept
 
void setSuffix (const ComponentSymbolVariantItemSuffix &suffix) noexcept
 
ComponentPinSignalMapgetPinSignalMap () noexcept
 
const ComponentPinSignalMapgetPinSignalMap () const noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const ComponentSymbolVariantItem &rhs) const noexcept
 
bool operator!= (const ComponentSymbolVariantItem &rhs) const noexcept
 
ComponentSymbolVariantItemoperator= (const ComponentSymbolVariantItem &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 Attributes

Uuid mUuid
 
Uuid mSymbolUuid
 
Point mSymbolPos
 
Angle mSymbolRot
 
bool mIsRequired
 
ComponentSymbolVariantItemSuffix mSuffix
 
ComponentPinSignalMap mPinSignalMap
 

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 ComponentSymbolVariantItem class represents one symbol of a component symbol variant.

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

  • UUID
  • Symbol UUID
  • Pin-signal-mapping
Todo:
Rename class to "ComponentGate" (or similar) and rename related classes if needed

Constructor & Destructor Documentation

ComponentSymbolVariantItem ( const Uuid uuid,
const Uuid symbolUuid,
const Point symbolPos,
const Angle symbolRotation,
bool  isRequired,
const ComponentSymbolVariantItemSuffix suffix 
)
noexcept
ComponentSymbolVariantItem ( const SExpression node)
explicit

+ Here is the call graph for this function:

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Uuid& getSymbolUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Point& getSymbolPosition ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Angle& getSymbolRotation ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool isRequired ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const ComponentSymbolVariantItemSuffix& getSuffix ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

void setSymbolUuid ( const Uuid uuid)
inlinenoexcept
void setSymbolPosition ( const Point pos)
inlinenoexcept
void setSymbolRotation ( const Angle rot)
inlinenoexcept
void setIsRequired ( bool  required)
inlinenoexcept
void setSuffix ( const ComponentSymbolVariantItemSuffix suffix)
inlinenoexcept
ComponentPinSignalMap& getPinSignalMap ( )
inlinenoexcept

+ Here is the caller graph for this function:

const ComponentPinSignalMap& getPinSignalMap ( ) const
inlinenoexcept
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 ComponentSymbolVariantItem rhs) const
noexcept
bool operator!= ( const ComponentSymbolVariantItem rhs) const
inlinenoexcept
ComponentSymbolVariantItem & operator= ( const ComponentSymbolVariantItem rhs)
noexcept

Member Data Documentation

Uuid mUuid
private
Uuid mSymbolUuid
private
Point mSymbolPos
private
Angle mSymbolRot
private
bool mIsRequired
private
ComponentPinSignalMap mPinSignalMap
private

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