On Wednesday 20 February 2002 1:32 pm, Angus Leeming wrote: Actually, that was a bit premature. This doesn't work! Has anybody any idea about how to write isStrPtr(str), strToPtr(str)? Should I use the C library function strtoul?
Angus > When the loading status of a graphics file changes, I need to inform LyX. I > do this with: > > LyXFunc::dispatch(LFUN_GRAPHICS_CHANGED_STATE, argument); > > where argument is a list of insets as a space-separated string. > I split the string up and convert each substring back to a pointer with: > > bool isStrPtr(string const & str) > { > return isStrUnsignedInt(str); > } > > > void * strToPtr(string const & str) > { > return (void *)strToUnsignedInt(str); > } > > Is there a better way? > Angus