libtld/tld_emails.cpp
bool tld_email_list::next(tld_email *e) const
{
    if(f_pos >= static_cast<int>(f_email_list.size()))
    {
        return false;
    }

    e->f_group               = f_email_list[f_pos].f_group.c_str();
    e->f_original_email      = f_email_list[f_pos].f_original_email.c_str();
    e->f_fullname            = f_email_list[f_pos].f_fullname.c_str();
    e->f_username            = f_email_list[f_pos].f_username.c_str();
    e->f_domain              = f_email_list[f_pos].f_domain.c_str();
    e->f_email_only          = f_email_list[f_pos].f_email_only.c_str();
    e->f_canonicalized_email = f_email_list[f_pos].f_canonicalized_email.c_str();
    ++f_pos;

    return true;
}
/** \brief Retrieve a copy of the next email information.
 *
 * This function reads the next email in your \p e parameter.
 *
 * The function returns true when the email parameter could be set. It
 * is very important that you check that return value because otherwise
 * you cannot actually know whether you reached the end of the list.
 *
 * \warning
 * The pointers saved in the tld_email structure are taken from the
 * list of emails defined in the tld_email_list object. If the list
 * is changed (by a call to the parse() function) then those pointers
 * become invalid.
 *
 * \param[out] e  The email object that receives the next item if there is one.
 *
 * \return true if e was set, false otherwise and e is not modified.
 */
\brief Retrieve a copy of the next email information.
This function reads the next email in your \p e parameter.

The function returns true when the email parameter could be set. It
is very important that you check that return value because otherwise
you cannot actually know whether you reached the end of the list.

\warning
The pointers saved in the tld_email structure are taken from the
list of emails defined in the tld_email_list object. If the list
is changed (by a call to the parse() function) then those pointers
become invalid.

\param[out] e  The email object that receives the next item if there is one.

\return true if e was set, false otherwise and e is not modified.
\ brief Retrieve a copy of the next email information . This function reads the next email in your \ p e parameter . The function returns true when the email parameter could be set . It is very important that you check that return value because otherwise you cannot actually know whether you reached the end of the list . \ warning The pointers saved in the tld_email structure are taken from the list of emails defined in the tld_email_list object . If the list is changed ( by a call to the parse () function ) then those pointers become invalid . \ param [ out ] e The email object that receives the next item if there is one . \ return true if e was set false otherwise and e is not modified .
bool tld_email_list::next(tld_email *e) const
{
    if(f_pos >= static_cast<int>(f_email_list.size()))
    {
        return false;
    }
    e->f_group               = f_email_list[f_pos].f_group.c_str();
    e->f_original_email      = f_email_list[f_pos].f_original_email.c_str();
    e->f_fullname            = f_email_list[f_pos].f_fullname.c_str();
    e->f_username            = f_email_list[f_pos].f_username.c_str();
    e->f_domain              = f_email_list[f_pos].f_domain.c_str();
    e->f_email_only          = f_email_list[f_pos].f_email_only.c_str();
    e->f_canonicalized_email = f_email_list[f_pos].f_canonicalized_email.c_str();
    ++f_pos;
    return true;
}
bool tld_email_list :: next ( tld_email * e ) const { if ( f_pos >= static_cast < int > ( f_email_list . size ( ) ) ) { return false ; } e -> f_group = f_email_list [ f_pos ] . f_group . c_str ( ) ; e -> f_original_email = f_email_list [ f_pos ] . f_original_email . c_str ( ) ; e -> f_fullname = f_email_list [ f_pos ] . f_fullname . c_str ( ) ; e -> f_username = f_email_list [ f_pos ] . f_username . c_str ( ) ; e -> f_domain = f_email_list [ f_pos ] . f_domain . c_str ( ) ; e -> f_email_only = f_email_list [ f_pos ] . f_email_only . c_str ( ) ; e -> f_canonicalized_email = f_email_list [ f_pos ] . f_canonicalized_email . c_str ( ) ; ++ f_pos ; return true ; }
\brief Retrieve a copy of the next email information.
\ brief Retrieve a copy of the next email information .