[Clam-devel] Port Type shown on the tooltip
David García Garzón
dgarcia at iua.upf.edu
Thu Jan 31 01:08:04 PST 2008
On Dijous 31 Gener 2008, Pau Arumí wrote:
> On dj, 2008-01-31 at 01:39 +0100, David García Garzón wrote:
> > On Dijous 31 Gener 2008, Pau Arumí wrote:
> > > On dc, 2008-01-30 at 23:35 +0100, David García Garzón wrote:
> > > > A fast feature before the release: As Pau requested during a workshop
> > > > to the Barcelona Media audio team, now the type of the port is shown
> > > > on the port tooltip. Mandatory screenshot:
> > > >
> > > > http://iua-share.upf.edu/wikis/clam/index.php/Image:NetEditor-PortHin
> > > >tWit hType.gif
> > >
> > > super!
> > >
> > > btw, how did you produced that gif? from a screencast?
> > 10 screenshots loaded into gimp as layers, saving them to gif (wikimedia
> > don't like mng's) and chosing to save layer as annimation frames ;-) the
> > auto numbering feature of ksnapshot that often nags me, now has been a
> > very useful help.
> > But that's not the question I expected from you. Have you noticed the
> > type strings? Look, mum! No mangling!
> oh! i was assuming that the name was "given" during the registration to
> the factory (of types). it is possible to de-mangle c++ types. great!
> you'll explain how.
Side note: Mangling is the internal format that a program symbol name for
functions, types and variables is represented in a binary which is dependant
on the compiler and the platform.
Here comes the code:
std::string demangle(const std::string & mangledName)
std::string result = mangledName;
int demangleError = 0;
char * demangled =
if (!demangleError && demangled)
result = demangled;
if (demangled) free(demangled);
(Have i told you that i hate C api's with char*?)
The function just demangles for gcc so it won't work for platforms such as...
hey! now we are using gcc in every platform! ;-)
In any case if you are not using gcc you still get the mangled typename, or
adding code for your itchywichy compiler.
> btw, "10 screenshots + gimp" was not the answer i expected from you :-)
> i'm sure it can be done with a screencast (i.e. recordmydesktop) and two
> commands; one for splitting video to pictures (avidemux does it) and
> another to build up the .gif (but don't know how)
Yes, but I started with a shot, then did another one to show the other port
and then, hey, let's do 8 more screenshots. You know, i trigger easy.
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the clam-devel