Symbolic printout of PortType enumeration values.

This commit is contained in:
Stephen Williams 2014-03-15 17:16:39 -07:00
parent f8e33b12cd
commit 751f19cc46
2 changed files with 30 additions and 0 deletions

View File

@ -145,6 +145,35 @@ ostream& operator << (ostream&o, ivl_switch_type_t val)
return o;
}
ostream& operator << (ostream&fd, PortType::Enum val)
{
switch (val) {
case PortType::NOT_A_PORT:
fd << "NOT_A_PORT";
break;
case PortType::PIMPLICIT:
fd << "PIMPLICIT";
break;
case PortType::PINPUT:
fd << "PINPUT";
break;
case PortType::POUTPUT:
fd << "POUTPUT";
break;
case PortType::PINOUT:
fd << "PINOUT";
break;
case PortType::PREF:
fd << "PREF";
break;
default:
fd << "PortType::Enum::?";
break;
}
return fd;
}
ostream& ivl_type_s::debug_dump(ostream&o) const
{
o << typeid(*this).name();

View File

@ -610,6 +610,7 @@ public:
static Enum merged( Enum lhs, Enum rhs );
};
extern std::ostream& operator << (std::ostream&, PortType::Enum);
/*
* Information on actual ports (rather than port-connected signals) of