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

Pebay, Philippe P pppebay at sandia.gov
Tue May 3 14:17:42 EDT 2011


Thanks David. That's exactly it.

Philippe

--
Philippe Pébay
Sandia National Laboratories
________________________________
From: David Cole [david.cole at kitware.com]
Sent: Tuesday, May 03, 2011 3:14 AM
To: Pebay, Philippe P
Cc: vtk-developers at vtk.org
Subject: Re: [vtk-developers] vtksys::CommandLineArguments::MULTI_ARGUMENT

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<mailto: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<http://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/da53b605/attachment.html>


More information about the vtk-developers mailing list