advgetopt/conf_file.cpp
/** \brief Remove a callback.
 *
 * This function is the opposite of the add_callback(). It removes a callback
 * that you previously added. This is useful if you are interested in hearing
 * about the changing values when set a first time but are not interested at
 * all about future changes.
 *
 * \param[in] id  The id returned by the add_callback() function.
 */
\brief Remove a callback.
This function is the opposite of the add_callback(). It removes a callback
that you previously added. This is useful if you are interested in hearing
about the changing values when set a first time but are not interested at
all about future changes.

\param[in] id  The id returned by the add_callback() function.
\ brief Remove a callback . This function is the opposite of the add_callback () . It removes a callback that you previously added . This is useful if you are interested in hearing about the changing values when set a first time but are not interested at all about future changes . \ param [ in ] id The id returned by the add_callback () function .
void conf_file::remove_callback(callback_id_t id)
{
    cppthread::guard lock(get_global_mutex());
    auto it(std::find_if(
              f_callbacks.begin()
            , f_callbacks.end()
            , [id](auto e)
            {
                return e.f_id == id;
            }));
    if(it != f_callbacks.end())
    {
        f_callbacks.erase(it);
    }
}
void conf_file :: remove_callback ( callback_id_t id ) { cppthread :: guard lock ( get_global_mutex ( ) ) ; auto it ( std :: find_if ( f_callbacks . begin ( ) , f_callbacks . end ( ) , [ id ] ( auto e ) { return e . f_id == id ; } ) ) ; if ( it != f_callbacks . end ( ) ) { f_callbacks . erase ( it ) ; } }
\brief Remove a callback.
\ brief Remove a callback .