[galib] Re: GAParameterList and embedded spaces
Nate Barney
barney at chgr.mc.vanderbilt.edu
Mon Apr 5 16:53:08 EDT 2004
On Thu, 2004-04-01 at 15:25, Nate Barney wrote:
> I'm hoping to use a single configuration file for GA parameters as well
> as program-specific parameters. My question is, is there any way to
> read from a std::istream a string parameter that might contain embedded
> spaces?
>
> For instance, one of my parameters is the file name for my input data
> set. If users run my program in windows, it's entirely possible that
> the filename contains spaces.
Hi all,
Since I didn't receive any replies to this, I'm forced to assume that
what I want to do isn't possible with GALib 2.4.5. So, I decided to
patch my copy of GAParameterList.C with code to understand quotes and
backslashes, which results in a nice way to specify parameters with
embedded spaces. [This was only necessary for
GAParameterList::read()... GAParameterList::parse() can already handle
spaces because of the way the command shell passes parameters to the
program. As such, I left GAParameterList::parse() unchanged.] If
anyone (especially Matthew) is interested in this code, let me know.
Thanks,
Nate
More information about the galib
mailing list