Bitstream Interpretation Library (BIL)  0.1
PIPString.cpp
Go to the documentation of this file.
1 
7 
8 using namespace bil;
9 
10 
11 std::string bil::pipString(const PIP& pip, const Wires& wires)
12 {
13  // get start and end wires
14  const Wire& startWire = wires.at(pip.startWireIndex());
15  const Wire& endWire = wires.at(pip.endWireIndex());
16 
17  // build string
18  std::string pipStr(startWire.name());
19  pipStr.push_back(' ');
20  pipStr.append(PIPDirection::toString(pip.direction()));
21  pipStr.push_back(' ');
22  pipStr.append(endWire.name());
23 
24  // return it
25  return pipStr;
26 }