1 // OpenSTA, Static Timing Analyzer
2 // Copyright (c) 2020, Parallax Software, Inc.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program.  If not, see <https://www.gnu.org/licenses/>.
16 
17 #pragma once
18 
19 #include "Set.hh"
20 #include "Vector.hh"
21 #include "Iterator.hh"
22 
23 namespace sta {
24 
25 class Network;
26 class NetworkEdit;
27 class NetworkReader;
28 class Library;
29 class Cell;
30 class Port;
31 class PortDirection;
32 class Instance;
33 class Pin;
34 class Term;
35 class Net;
36 class ConstantPinIterator;
37 class ViewType;
38 class LibertyLibrary;
39 
40 typedef Iterator<Library*> LibraryIterator;
41 typedef Iterator<LibertyLibrary*> LibertyLibraryIterator;
42 typedef Vector<Cell*> CellSeq;
43 typedef Set<Cell*> CellSet;
44 typedef Vector<Port*> PortSeq;
45 typedef Set<Port*> PortSet;
46 typedef Iterator<Port*> CellPortIterator;
47 typedef Iterator<Port*> CellPortBitIterator;
48 typedef Iterator<Port*> PortMemberIterator;
49 typedef std::pair<Port*, Port*> PortPair;
50 
51 typedef Vector<Pin*> PinSeq;
52 typedef Vector<const Pin*> ConstPinSeq;
53 typedef Vector<Instance*> InstanceSeq;
54 typedef Vector<const Instance*> ConstInstanceSeq;
55 typedef Vector<Net*> NetSeq;
56 typedef Set<Pin*> PinSet;
57 typedef Set<Instance*> InstanceSet;
58 typedef Set<Net*> NetSet;
59 typedef Iterator<Instance*> InstanceChildIterator;
60 typedef Iterator<Pin*> InstancePinIterator;
61 typedef Iterator<Net*> InstanceNetIterator;
62 typedef Iterator<Instance*> LeafInstanceIterator;
63 typedef Iterator<Net*> NetIterator;
64 typedef Iterator<Pin*> NetPinIterator;
65 typedef Iterator<Term*> NetTermIterator;
66 typedef Iterator<Pin*> ConnectedPinIterator;
67 typedef ConnectedPinIterator NetConnectedPinIterator;
68 typedef ConnectedPinIterator PinConnectedPinIterator;
69 
70 class PortPairLess
71 {
72 public:
73   bool operator()(const PortPair *pair1,
74 		  const PortPair *pair2) const;
75 };
76 
77 enum class LogicValue : unsigned { zero, one, unknown, rise, fall };
78 
79 } // namespace
80