-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAC Models Refactoring: getClassName() #1071
Conversation
The same kind of function is contained in many other PCL classes (e.g. Filter, Registration, Feature).
The function is obsoleted by getClassName().
I'm a little biased here. Isn't it the same as typeid().name()? On the other side, a consistent API is nice as well. |
No, it is different.
Will output something like By the way, recent versions of Boost feature new "TypeIndex" library, which provides desired output:
gives |
Just pipe it thought c++filt ;). |
@jspricke I'm not sure if I understood your comment. If this is a joke, then can we merge and move on? If it's not, then could you please elaborate on what exactly you propose? |
Sorry, that wasn't meant as an offense. c++filt is part of binutils and can unmangle the type name: |
I know what PCL_ERROR ("[pcl::%s::initCompute] No input dataset containing normals was given!\n", getClassName ().c_str ()); Of course, we can print mangled name here, but then the user will get nonsense messages unless he manually pipes program output through No offense taken, I simply didn't understand your idea :) |
SAC Models Refactoring: getClassName()
I don't care about Windows users ;) |
I have came across a bug in SAC Sphere model. While investigating how to fix it I have dug in the model sources and was surprised by a large amount of code repetition. Therefore, I decided to do a bit of refactoring together with fixing the bug. I will submit the changes in a series of pull request to simplify review process.
This pull request adds
getClassName()
function to all SAC models. (The same kind of function is contained in many other PCL classes such asFilter
,Registration
,Feature
, etc.). It comes in handy e.g. when logging errors.