<span class="kwd">Since it's all static methods and no classes will derive from it, I was thinking something along the lines of:<br>static</span><span class="pln"> </span><span class="kwd">void</span><span class="pln"> </span><span class="typ">DeserializeMetaData</span><span class="pun">(</span><div class="GJEA35ODHC">
<span class="pln">  vtkMultiProcessStream</span><span class="pun">&</span><span class="pln"> bytestream</span><span class="pun">,</span><br></div><span class="pln">  std::vector<std</span><span class="pun">::</span><span class="kwd">string></span><span class="pun"></span><span class="pln"> </span><span class="pun">&</span><span class="pln">names</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">std::vector<int> </span><span class="pun"></span><span class="pln"></span><span class="pun">&</span><span class="pln">datatypes</span><span class="pun">,</span><br>
<span class="pln"></span><span class="kwd">  std::vector<int></span><span class="pun"></span><span class="pln"> </span><span class="pun">&</span><span class="pln">dimensions</span><span class="pun"></span><span class="pln"></span><span class="kwd"></span><span class="pln"></span><span class="pun"></span><span class="typ"></span><span class="pun">);<br>
<br>Using a vtkStringArray and vtkIntArrays though would work out just as well though.<br><br>Both of them are much better than allocating memory in the function and expecting the user to delete them afterwards.<br><br></span>Andy<br>
<br><div class="gmail_quote">On Mon, Apr 2, 2012 at 9:54 PM, George Zagaris <span dir="ltr"><<a href="mailto:george.zagaris@kitware.com">george.zagaris@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, Apr 2, 2012 at 9:34 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> Almost anything is better than "std::string* &names".  The odds are<br>
> slim to none that an arg like that will ever be wrapped ;)<br>
><br>
> Any reason for not using vtkStringArray and vtkIntArray?  Are you<br>
> concerned about their efficiency?<br>
<br>
</div>Efficiency is not a huge concern for this method since field data<br>
metadata is relatively small. I would prefer a lighter API, but, I am<br>
not against changing the method to use vtkStringArray and vtkIntArray.<br>
<br>
Thanks for your feedback.<br>
<div class="HOEnZb"><div class="h5"><br>
Best,<br>
George<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br>