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

The ComponentSymbolVariant class represents a symbol variant of a component. More...

#include <componentsymbolvariant.h>

+ Inheritance diagram for ComponentSymbolVariant:
+ Collaboration diagram for ComponentSymbolVariant:

Signals

void edited ()
 

Public Member Functions

 ComponentSymbolVariant ()=delete
 
 ComponentSymbolVariant (const ComponentSymbolVariant &other) noexcept
 
 ComponentSymbolVariant (const Uuid &uuid, const QString &norm, const ElementName &name_en_US, const QString &desc_en_US) noexcept
 
 ComponentSymbolVariant (const SExpression &node)
 
 ~ComponentSymbolVariant () noexcept
 
const UuidgetUuid () const noexcept
 
const QString & getNorm () const noexcept
 
const LocalizedNameMapgetNames () const noexcept
 
const LocalizedDescriptionMapgetDescriptions () const noexcept
 
void setNorm (const QString &norm) noexcept
 
void setName (const QString &locale, const ElementName &name) noexcept
 
void setDescription (const QString &locale, const QString &desc) noexcept
 
void setNames (const LocalizedNameMap &names) noexcept
 
void setDescriptions (const LocalizedDescriptionMap &descriptions) noexcept
 
ComponentSymbolVariantItemListgetSymbolItems () noexcept
 
const
ComponentSymbolVariantItemList
getSymbolItems () const noexcept
 
QSet< UuidgetAllSymbolUuids () const noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const ComponentSymbolVariant &rhs) const noexcept
 
bool operator!= (const ComponentSymbolVariant &rhs) const noexcept
 
ComponentSymbolVariantoperator= (const ComponentSymbolVariant &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 ComponentSymbolVariantItemList &list, int newIndex, const std::shared_ptr< ComponentSymbolVariantItem > &ptr) noexceptoverride
 
void listObjectRemoved (const ComponentSymbolVariantItemList &list, int oldIndex, const std::shared_ptr< ComponentSymbolVariantItem > &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
 
QString mNorm
 
LocalizedNameMap mNames
 
LocalizedDescriptionMap mDescriptions
 
ComponentSymbolVariantItemList mSymbolItems
 

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

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

  • UUID
  • Symbol items (neither adding nor removing items is allowed)
    • UUID
    • Symbol UUID
    • Pin-signal-mapping

Constructor & Destructor Documentation

ComponentSymbolVariant ( const ComponentSymbolVariant other)
noexcept
ComponentSymbolVariant ( const Uuid uuid,
const QString &  norm,
const ElementName name_en_US,
const QString &  desc_en_US 
)
noexcept
ComponentSymbolVariant ( const SExpression node)
explicit

+ Here is the call graph for this function:

~ComponentSymbolVariant ( )
noexcept

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QString& getNorm ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const LocalizedNameMap& getNames ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const LocalizedDescriptionMap& getDescriptions ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

void setNorm ( const QString &  norm)
noexcept

+ Here is the caller graph for this function:

void setName ( const QString &  locale,
const ElementName name 
)
noexcept

+ Here is the caller graph for this function:

void setDescription ( const QString &  locale,
const QString &  desc 
)
noexcept

+ Here is the caller graph for this function:

void setNames ( const LocalizedNameMap names)
noexcept

+ Here is the caller graph for this function:

void setDescriptions ( const LocalizedDescriptionMap descriptions)
noexcept

+ Here is the caller graph for this function:

ComponentSymbolVariantItemList& getSymbolItems ( )
inlinenoexcept

+ Here is the caller graph for this function:

const ComponentSymbolVariantItemList& getSymbolItems ( ) const
inlinenoexcept
QSet<Uuid> getAllSymbolUuids ( ) const
inlinenoexcept

+ Here is the call 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 ComponentSymbolVariant rhs) const
noexcept
bool operator!= ( const ComponentSymbolVariant rhs) const
inlinenoexcept
ComponentSymbolVariant & operator= ( const ComponentSymbolVariant rhs)
noexcept
void edited ( )
signal

+ Here is the caller graph for this function:

void listObjectAdded ( const ComponentSymbolVariantItemList list,
int  newIndex,
const std::shared_ptr< ComponentSymbolVariantItem > &  ptr 
)
overrideprivatenoexcept
void listObjectRemoved ( const ComponentSymbolVariantItemList list,
int  oldIndex,
const std::shared_ptr< ComponentSymbolVariantItem > &  ptr 
)
overrideprivatenoexcept

Member Data Documentation

Uuid mUuid
private
QString mNorm
private
LocalizedNameMap mNames
private
LocalizedDescriptionMap mDescriptions
private
ComponentSymbolVariantItemList mSymbolItems
private

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