program options validate function question

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
participants (1)
-
Suresh T