[Paraview] Improving vtkDataArraySelection ... and a question of the general philosophy
Mark Olesen
Mark.Olesen at emconTechnologies.com
Wed Nov 4 10:21:33 EST 2009
I was looking at making some minor tweaks to vtkDataArraySelection and
started wondering why some things are being done the way they are.
First off I'll explain what I wanted.
I'd like an additional method
int AddArray(const char* name, int defaultStatus);
The behaviour is as per AddArray(const char*), but with the ability to
specify which default status should be used when it is created.
[
I really cannot figure out a workaround for adding an array
entry with an unselected state that doesn't automatically
trigger this->Modified();
]
Then the questions begin:
The method probably doesn't exist in that form since nobody thought they
needed it. However, it could also be that having multiple signatures is
frowned upon in VTK. Or are there problems with binding to other
languages?
Having said that, the methods are surrounded by a BTX/ETX pair so
wrapping may not be the problem, but I'm not sure.
After taking a slightly closer look, I also noticed that the internals
use a vtkstd::vector<vtkstd::string> and a vtkstd::vector<int> for the
storage.
If there is a std::string under the hood, is there any other reason
(beyond language wrapping) that we have everything with (const char*)
parameters instead of (const vtkstd::string&)?
Is it only historical that a vtkstd::vector<int> is used for storing a
bool state? Or is there a desire to avoid the std::vector<bool>
specialization?
Thanks,
/mark
This e-mail message and any attachments may contain legally privileged, confidential or proprietary Information, or information otherwise protected by law of EMCON Technologies, its affiliates, or third parties. This notice serves as marking of its "Confidential" status as defined in any confidentiality agreements concerning the sender and recipient. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this e-mail message is strictly prohibited.
If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.
More information about the ParaView
mailing list