vhdlpp: Added VTypeEnum::write_to_stream().

This commit is contained in:
Maciej Suminski 2014-09-05 14:58:48 +02:00
parent ef7ac5ed03
commit 94caa4881e
2 changed files with 16 additions and 0 deletions

View File

@ -240,6 +240,7 @@ class VTypeEnum : public VType {
VTypeEnum(const std::list<perm_string>*names);
~VTypeEnum();
void write_to_stream(std::ostream&fd) const;
void show(std::ostream&) const;
int emit_def(std::ostream&out, perm_string name) const;

View File

@ -148,3 +148,18 @@ void VTypeRecord::element_t::write_to_stream(ostream&fd) const
fd << name_ << ": ";
type_->write_to_stream(fd);
}
void VTypeEnum::write_to_stream(std::ostream&fd) const
{
fd << "(";
for (vector<perm_string>::const_iterator it = names_.begin();
it != names_.end(); ++it) {
if(it != names_.begin())
fd << ",";
fd << *it;
}
fd << ")";
}