[vtk-developers] vtksys::CommandLineArguments::MULTI_ARGUMENT

David Cole david.cole at kitware.com
Tue May 3 06:14:50 EDT 2011


The variable "dataDim" should be declared as:

  vtksys_stl::vector<int> dataDim;

to work with MULTI_ARGUMENT.

Is it?


HTH,
David


On Mon, May 2, 2011 at 8:16 PM, Philippe Pébay <pppebay at sandia.gov> wrote:

> Hello,
>
> I can't get the multi-argument type of argument parsing in
> kwsys::CommandLineArguments to work.
>
> Specifically, here is what I am doing:
>  args.AddArgument("--data-dim",
>                     vtksys::CommandLineArguments::MULTI_ARGUMENT,
>                     &dataDim, "Dimensions of the input data");
> where dataDim is an array of integers, previously sized with the expected
> number of arguments.
>
> What the parser does is to only take the first amongst the list of
> arguments which I then pass, for example
> --data-dim 1 2 3
> results in only the "1" being taken into account, the following parameters
> being ignored.
>
> It does not seem that there is a single example using the MULTI_ARGUMENT
> case in the entire VTK. Does anyone know how to use it?
>
> Thanks
> Philippe
> --
> Philippe Pébay
> Sandia National Laboratories
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110503/ff282a21/attachment.html>


More information about the vtk-developers mailing list