Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-01-23 13:04:43


Fernando Cacciola wrote:

> I'll drop in out of context because I considered once something that might
> be relevant to this thread.
> Accessing environment variables has a LOT in common with accessing windows
> registry or configuration file variables.

True. And it has a lot of common with command line options. Some time ago I
found it quite convenient to have config file and command line to work
together: config file has many options and command line can override some of
them.

> Could it be possible that the people working on this consider a generalized
> external source variable accessing framework?
> Would this be too much of a burden?
>
> I'm thinking about something that would look like:
>
> string location = external::get(env(),"LOCATION", "c:/");
> string user = external::get(registry(),"UserName", "c:/");

What I'd like (and what I'm trying to implement in command line/config file
parser) is map like interface. So that one could be able to say

        environment["http_proxy"].as<ip_address>()

where "as" method is a shortcut to lexical_cast/any_cast.

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk