Boost logo

Boost Users :

From: Suresh T (suresh.t_at_[hidden])
Date: 2006-06-06 23:52:38


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 ?

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