Horizon
Loading...
Searching...
No Matches
horizon::Schematic Class Reference

A Schematic is the visual representation of a Block. More...

#include <schematic.hpp>

Classes

class  Annotation
class  SheetMapping
struct  SheetItem

Public Member Functions

 Schematic (const UUID &uu, const json &, Block &block, class IPool &pool, class IBlockSymbolAndSchematicProvider &prv)
 Schematic (const UUID &uu, Block &block)
void expand (bool careful=false, const class IInstanceMappingProvider *inst_map=nullptr)
 This is where the magic happens.
void expand_connectivity (bool carful=false)
 Schematic (const Schematic &sch)
void operator= (const Schematic &sch)=delete
void update_refs ()
 objects owned by the Sheets may hold pointers to other objects of the same sheet or the Block associated with the Schematic.
void disconnect_symbol (Sheet *sheet, SchematicSymbol *sym)
 Removes all connections from sym and connects the dangling net lines to junctions.
void autoconnect_symbol (Sheet *sheet, SchematicSymbol *sym)
 Connects unconnected pins of sym to Nets specified by junctions coincident with pins.
void autoconnect_block_symbol (Sheet *sheet, SchematicBlockSymbol *sym)
void smash_symbol (Sheet *sheet, SchematicSymbol *sym)
 Turns sym's texts to regular text objects.
void unsmash_symbol (Sheet *sheet, SchematicSymbol *sym)
 Undoes what smash_symbol did.
bool delete_net_line (Sheet *sheet, LineNet *line)
bool place_bipole_on_line (Sheet *sheet, SchematicSymbol *sym)
void swap_gates (const UUID &comp, const UUID &g1, const UUID &g2)
void disconnect_block_symbol (Sheet *sheet, SchematicBlockSymbol *sym)
std::map< UUIDPath< 2 >, std::string > get_unplaced_gates () const
Sheetadd_sheet ()
void delete_sheet (const UUID &uu)
Sheetget_sheet_at_index (unsigned int index)
const Sheetget_sheet_at_index (unsigned int index) const
void annotate ()
void update_sheet_mapping ()
std::vector< SheetItem< false > > get_all_sheets ()
std::vector< SheetItem< true > > get_all_sheets () const
json serialize () const
void load_pictures (const std::string &dir)
ItemSet get_pool_items_used () const
std::vector< Sheet * > get_sheets_sorted ()
std::vector< const Sheet * > get_sheets_sorted () const

Static Public Member Functions

static Schematic new_from_file (const std::string &filename, Block &block, IPool &pool, class IBlockSymbolAndSchematicProvider &prv)
static unsigned int get_app_version ()
static Glib::RefPtr< Glib::Regex > get_sheetref_regex ()

Public Attributes

UUID uuid
Blockblock
std::string name
std::map< UUID, Sheetsheets
SchematicRules rules
bool group_tag_visible = false
Annotation annotation
SheetMapping sheet_mapping
PDFExportSettings pdf_export_settings
FileVersion version

Detailed Description

A Schematic is the visual representation of a Block.

Contrary to other EDA systems, the Schematic isn't the source of truth to horizon, the Block is. During editing, Block and Schematic are edited in sync. After Editing is done, Schematic::expand() updates the Schematic according to the Block, filling in reference designators and assigning nets to LineNets.

A Schematic is made up of one or many Sheets.

Member Function Documentation

◆ expand()

void horizon::Schematic::expand ( bool careful = false,
const class IInstanceMappingProvider * inst_map = nullptr )

This is where the magic happens.

Parameters
carfulwhen true, superfluous things will get cleaned up. Don't do this when you may hold pointers to these.

◆ update_refs()

void horizon::Schematic::update_refs ( )

objects owned by the Sheets may hold pointers to other objects of the same sheet or the Block associated with the Schematic.

When pointing block to a different block, call this method to fix up pointers. When copying Schematic, the copy constructor will call this method.


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