Horizon
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
horizon::Component Class Reference

A Component is an instanced Entity in a Block. More...

#include <component.hpp>

Classes

class  AltPinInfo
 used to select alternate pin names More...
 

Public Types

enum class  NopopulateFromInstance { SET , CLEAR , UNSET }
 

Public Member Functions

 Component (const UUID &uu, const json &j, class IPool &pool, class Block *block=nullptr)
 
 Component (const UUID &uu)
 
UUID get_uuid () const
 
bool get_nopopulate () const
 
const std::string & get_prefix () const
 
Pin::Direction get_effective_direction (const UUIDPath< 2 > &path) const
 
std::string replace_text (const std::string &t, bool *replaced=nullptr) const
 
ItemSet get_pool_items_used () const
 
json serialize () const
 

Static Public Member Functions

static Pin::Direction get_effective_direction (const Component::AltPinInfo &alt, const Pin &pin)
 

Public Attributes

UUID uuid
 
std::shared_ptr< const class Entityentity = nullptr
 
std::shared_ptr< const class Partpart = nullptr
 
std::string refdes
 
std::string value
 
UUID group
 
UUID tag
 
bool nopopulate = false
 
UUIDVec href
 
NopopulateFromInstance nopopulate_from_instance = NopopulateFromInstance::UNSET
 
std::map< UUIDPath< 2 >, Connectionconnections
 which Nins are connected to which Net the UUIDPath consists of Gate and Pin UUID
 
std::map< UUIDPath< 2 >, AltPinInfoalt_pins
 

Detailed Description

A Component is an instanced Entity in a Block.

Like in other places around horizon, a Component is identified by its UUID, not by its reference designator. Ensuring unique refdes is up to other parts of the application.

Usually, a Component will be assigned a Part to map it to a real-world thing one can order and put on a PCB. The Part must have the same Entity as the Component. The assignment can be changed at any time. This simplifies exchanging parts for logically identical parts of the same kind. When a part Pis assigned, the value of the Component gets overriden by the Part.


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