KiCad PCB EDA Suite
class_netlist_object.h File Reference

Definition of the NETLIST_OBJECT class. More...

#include <sch_sheet_path.h>
#include <lib_pin.h>
#include <sch_item_struct.h>

Go to the source code of this file.

Classes

class  NETLIST_OBJECT
 
class  NETLIST_OBJECT_LIST
 Class NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected items in a full schematic hierarchy. More...
 

Typedefs

typedef std::vector< NETLIST_OBJECT * > NETLIST_OBJECTS
 Type NETLIST_OBJECTS is a container referring to (not owning) NETLIST_OBJECTs, which are connected items in a full schematic hierarchy. More...
 

Enumerations

enum  NETLIST_ITEM_T {
  NET_ITEM_UNSPECIFIED, NET_SEGMENT, NET_BUS, NET_JUNCTION,
  NET_LABEL, NET_GLOBLABEL, NET_HIERLABEL, NET_SHEETLABEL,
  NET_BUSLABELMEMBER, NET_GLOBBUSLABELMEMBER, NET_HIERBUSLABELMEMBER, NET_SHEETBUSLABELMEMBER,
  NET_PINLABEL, NET_PIN, NET_NOCONNECT
}
 
enum  NET_CONNECTION_T { UNCONNECTED = 0, NOCONNECT_SYMBOL_PRESENT, PAD_CONNECT }
 

Functions

bool IsBusLabel (const wxString &aLabel)
 Function IsBusLabel test if aLabel has a bus notation. More...
 

Detailed Description

Definition of the NETLIST_OBJECT class.

Definition in file class_netlist_object.h.

Typedef Documentation

typedef std::vector<NETLIST_OBJECT*> NETLIST_OBJECTS

Type NETLIST_OBJECTS is a container referring to (not owning) NETLIST_OBJECTs, which are connected items in a full schematic hierarchy.

It is useful when referring to NETLIST_OBJECTs actually owned by some other container.

Definition at line 276 of file class_netlist_object.h.

Enumeration Type Documentation

Enumerator
UNCONNECTED 
NOCONNECT_SYMBOL_PRESENT 
PAD_CONNECT 

Definition at line 83 of file class_netlist_object.h.

84 {
85  UNCONNECTED = 0, /* Pin or Label not connected (error) */
86  NOCONNECT_SYMBOL_PRESENT, /* Pin not connected but have a NoConnect
87  * symbol on it (no error) */
88  PAD_CONNECT /* Normal connection (no error) */
89 };
Enumerator
NET_ITEM_UNSPECIFIED 
NET_SEGMENT 
NET_BUS 
NET_JUNCTION 
NET_LABEL 
NET_GLOBLABEL 
NET_HIERLABEL 
NET_SHEETLABEL 
NET_BUSLABELMEMBER 
NET_GLOBBUSLABELMEMBER 
NET_HIERBUSLABELMEMBER 
NET_SHEETBUSLABELMEMBER 
NET_PINLABEL 
NET_PIN 
NET_NOCONNECT 

Definition at line 44 of file class_netlist_object.h.

45 {
46  NET_ITEM_UNSPECIFIED, // only for not yet initialized instances
47  NET_SEGMENT, // connection by wire
48  NET_BUS, // connection by bus
49  NET_JUNCTION, // connection by junction: can connect to
50  // or more crossing wires
51  NET_LABEL, // this is a local label
52  NET_GLOBLABEL, // this is a global label that connect all
53  // others global label in whole hierarchy
54  NET_HIERLABEL, // element to indicate connection to a
55  // higher-level sheet
56  NET_SHEETLABEL, // element to indicate connection to a
57  // lower-level sheet.
58  NET_BUSLABELMEMBER, /* created when a bus label is found:
59  * the bus label (like DATA[0..7] is
60  * converted to n single labels like
61  * DATA0, DATA1 ...
62  * These objects are living only in the current
63  * NETLIST_OBJECT_LIST, not in shematic.
64  */
65  NET_GLOBBUSLABELMEMBER, // see NET_BUSLABELMEMBER, used when a
66  // global bus label is found
67  NET_HIERBUSLABELMEMBER, // see NET_BUSLABELMEMBER, used when a
68  // hierarchical bus label is found
69  NET_SHEETBUSLABELMEMBER, // see NET_BUSLABELMEMBER, used when a
70  // pin sheet label using bus notation
71  // is found
72  NET_PINLABEL, /* created when a pin is POWER (IN or
73  * OUT) with invisible attribute is found:
74  * these pins are equivalent to a global
75  * label and are automatically connected
76  */
77  NET_PIN, // this is an usual pin
78  NET_NOCONNECT // this is a no connect symbol
79 };

Function Documentation

bool IsBusLabel ( const wxString &  aLabel)

Function IsBusLabel test if aLabel has a bus notation.

Parameters
aLabelA wxString object containing the label to test.
Returns
true if text is a bus notation format otherwise false is returned.

Definition at line 49 of file class_netlist_object.cpp.

References busLabelRe().

Referenced by NETLIST_OBJECT::ConvertBusToNetListItems(), SCH_TEXT::GetNetListItem(), SCH_SHEET::GetNetListItem(), and SCH_SCREEN::IsTerminalPoint().

50 {
51  wxCHECK_MSG( busLabelRe.IsValid(), false,
52  wxT( "Invalid regular expression in IsBusLabel()." ) );
53 
54  return busLabelRe.Matches( aLabel );
55 }
static wxRegEx busLabelRe(wxT("^([^[:space:]]+)(\\[[\\d]+\\.+[\\d]+\\])$"), wxRE_ADVANCED)
The regular expression string for label bus notation.