advgetopt/conf_file.cpp
/** \brief Get the named parameter.
 *
 * This function searches for the specified parameter. If that parameter
 * exists, then its value is returned. Note that the value of a parameter
 * may be the empty string.
 *
 * If the parameter does not exist, the function returns the empty string.
 * To distinguish between an undefined parameter and a parameter set to
 * the empty string, use the has_parameter() function.
 *
 * \param[in] name  The name of the parameter to retrieve.
 *
 * \return The current value of the parameter or an empty string.
 *
 * \sa has_parameter()
 * \sa set_parameter()
 */
\brief Get the named parameter.
This function searches for the specified parameter. If that parameter
exists, then its value is returned. Note that the value of a parameter
may be the empty string.

If the parameter does not exist, the function returns the empty string.
To distinguish between an undefined parameter and a parameter set to
the empty string, use the has_parameter() function.

\param[in] name  The name of the parameter to retrieve.

\return The current value of the parameter or an empty string.


\ brief Get the named parameter . This function searches for the specified parameter . If that parameter exists then its value is returned . Note that the value of a parameter may be the empty string . If the parameter does not exist the function returns the empty string . To distinguish between an undefined parameter and a parameter set to the empty string use the has_parameter () function . \ param [ in ] name The name of the parameter to retrieve . \ return The current value of the parameter or an empty string .
std::string conf_file::get_parameter(std::string name) const
{
    std::replace(name.begin(), name.end(), '_', '-');
    cppthread::guard lock(get_global_mutex());
    auto it(f_parameters.find(name));
    if(it != f_parameters.end())
    {
        return it->second;
    }
    return std::string();
}
std :: string conf_file :: get_parameter ( std :: string name ) const { std :: replace ( name . begin ( ) , name . end ( ) , ' ' , ' ' ) ; cppthread :: guard lock ( get_global_mutex ( ) ) ; auto it ( f_parameters . find ( name ) ) ; if ( it != f_parameters . end ( ) ) { return it -> second ; } return std :: string ( ) ; }
\brief Get the named parameter.
\ brief Get the named parameter .