SymbolFactory internalization identifier should be its own type
hzeller opened this issue · comments
Right now, the identifier SymbolFactory
gives out is an unsigned int
. I think this should be more opaque so that it is more clear when used
class SymbolFactory {
public:
typdef unsigned int ID;
//...
ID make(const std::string& symbol);
}
Then later, in the generated files, we can instead, instead of
unsigned int vpiFile_;
use
SymbolFactory::ID vpiFile_;
This makes code easier to navigate and understand and also allows to do interesting things with the ID
in the future (it could be a more type-safe thing than an alias to an int
value for instance).