A more compact string representation for Hurricane::Path.
This commit is contained in:
parent
dbb16b618f
commit
11390867f1
|
@ -256,16 +256,21 @@ void Path::setNameSeparator(char nameSeparator)
|
|||
SharedPath::setNameSeparator(nameSeparator);
|
||||
}
|
||||
|
||||
string Path::getCompactString() const
|
||||
// **********************************
|
||||
string Path::getCompactString( bool showBrackets ) const
|
||||
// *****************************************************
|
||||
{
|
||||
if (isEmpty()) return "<empty>";
|
||||
if (isEmpty()) {
|
||||
if (not showBrackets) return "__empty__";
|
||||
return "<empty>";
|
||||
}
|
||||
|
||||
string s = "<";
|
||||
string s;
|
||||
if (showBrackets) s += "<";
|
||||
s += getString(getOwnerCell()->getName());
|
||||
s += ":";
|
||||
s += getString(_sharedPath->getName()) + ":";
|
||||
s += getString(getMasterCell()->getName()) + ">";
|
||||
s += getString(_sharedPath->getName());
|
||||
if (showBrackets)
|
||||
s += ":" + getString(getMasterCell()->getName()) + ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ class Path {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: string getCompactString() const;
|
||||
public: string getCompactString(bool showBrackets=true) const;
|
||||
public: string getJsonString(unsigned long flags) const;
|
||||
public: string _getTypeName() const { return _TName("Occurrence"); };
|
||||
public: string _getString() const;
|
||||
|
|
|
@ -866,6 +866,7 @@ extern "C" {
|
|||
LoadObjectConstant(PyTypeCell.tp_dict,Cell::Flags::BuildClockRings ,"Flags_BuildClockRings");
|
||||
LoadObjectConstant(PyTypeCell.tp_dict,Cell::Flags::BuildSupplyRings,"Flags_BuildSupplyRings");
|
||||
LoadObjectConstant(PyTypeCell.tp_dict,Cell::Flags::NoClockFlatten ,"Flags_NoClockFlatten");
|
||||
LoadObjectConstant(PyTypeCell.tp_dict,Cell::Flags::TerminalNetlist ,"Flags_TerminalNetlist");
|
||||
LoadObjectConstant(PyTypeCell.tp_dict,Cell::Flags::AbstractedSupply,"Flags_AbstractedSupply");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue