|
From: <fa...@ca...> - 2004-07-14 20:04:07
|
> How about this: create a translate table between the canonical long names > and unique short names. Create a short name for each canonical name by > stripping everything before the final ::, if any; stripping all template > arguments if any; optionally deleting some characters as suggested > elsewhere; and if necessary append a sequence number to make this short > name unique. Use the short names in the plot, and also print the > translate table. >=20 > Just my 0.02 euro. >=20 > Jeroen. I'm not sure about stripping all template arguments - this would cause me problems as much of my storage is vector<T>. Stripping to the final :: sounds good, as long as it is done for each argument as well (I need to remove "std::"). You'd essentially need a simple C++ parser? Perhaps handle this similarly to error suppression? Have a config file with individual string replacements that would all be applied to each fnname, where the built in ones could include space removal and such (as required by hp2ps). This could include entire function names, as well as general rules. Straight forward (?) to apply with perl to .hp file after the fact, but don't know if that'd be acceptable. Otherwise replace clean_fnname(). - Matt |