Horizon
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
horizon::Schematic Class Reference

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

#include <schematic.hpp>

Classes

class  Annotation
 

Public Member Functions

 Schematic (const UUID &uu, Block &block)
 
void expand (bool careful=false)
 This is where the magic happens. More...
 
 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. More...
 
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 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)
 
std::map< UUIDPath< 2 >, std::string > get_unplaced_gates () const
 
void annotate ()
 
json serialize () const
 
void save_pictures (const std::string &dir) const
 
void load_pictures (const std::string &dir)
 
 Schematic (const UUID &uu, Block &block)
 
void expand (bool careful=false)
 This is where the magic happens. More...
 
 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. More...
 
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 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)
 
std::map< UUIDPath< 2 >, std::string > get_unplaced_gates () const
 
void annotate ()
 
json serialize () const
 
void save_pictures (const std::string &dir) const
 
void load_pictures (const std::string &dir)
 

Static Public Member Functions

static Schematic new_from_file (const std::string &filename, Block &block, IPool &pool)
 
static Glib::RefPtr< Glib::Regex > get_sheetref_regex ()
 
static Schematic new_from_file (const std::string &filename, Block &block, IPool &pool)
 
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
 
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() [1/2]

void horizon::Schematic::expand ( bool  careful = false)

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.

◆ expand() [2/2]

void horizon::Schematic::expand ( bool  careful = false)

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() [1/2]

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.

◆ update_refs() [2/2]

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: