Boost logo

Boost Users :

From: Suresh T (suresh.t_at_[hidden])
Date: 2006-06-07 02:04:05


hello boosters,

I have a class ( say user_type ) that i would like to use for storing
cmd line option and therefore i have a validate function for the same
void validate ( boost::any& v, const std::vector<std::string>&
xs, <user_type> * target, int i )
I wanted to know if it is possible to access the actual variable in which
the option would be stored from within the validate function.

Meaning if i the options_description is something like below:
//here user_type_object is an instance of user_type
("option_name" , po::value<user_type>(&user_type_object), "some option" )

Is it possible to access the user_type_object in the validate function? If
so please let me know how ?

P.S: I am resending this mail as my mail sys. crashed after i sent it the
first time in morningso not sure if this was sent. If any one has replied
earlier request
that they redo as i have lost earlier mails

Thanks & Rgds,
---------------------------------------------------------------------------------------------------------
Suresh.T


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net