ionflux.org | Impressum

Ionflux::Tools::EMailAddress Class Reference
[General tools]

EMail address. More...

#include <EMailAddress.hpp>

Inheritance diagram for Ionflux::Tools::EMailAddress:

Inheritance graph
[legend]
Collaboration diagram for Ionflux::Tools::EMailAddress:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EMailAddress ()
 Constructor.
 EMailAddress (const EMailAddress &initAddress)
 Constructor.
 EMailAddress (const std::string &initRawAddress)
 Constructor.
virtual ~EMailAddress ()
 Destructor.
virtual void clear ()
 Clear.
virtual bool parse (const std::string &newRawAddress="")
 Parse email address.
virtual bool isValid () const
 Validate address.
virtual const std::vector<
Mailbox > & 
getMailboxes () const
 Get mailboxes.
virtual unsigned int getNumMailboxes () const
 Get number of mailboxes.
virtual Mailbox getMailbox (unsigned int mailboxIndex=0) const
 Get mailbox.
virtual EMailAddressoperator= (const EMailAddress &newEMailAddress)
 Assignment operator.
virtual EMailAddressoperator= (const std::string &newRawAddress)
 Assignment operator.
virtual void printDebugInfo () const
 Print debug information.
virtual void setRawAddress (const std::string &newRawAddress)
 Set unparsed address.
virtual void setDisplayName (const std::string &newDisplayName)
 Set display name (mailbox or group).
virtual std::string getRawAddress () const
 Get unparsed address.
virtual std::string getDisplayName () const
 Get display name (mailbox or group).

Static Public Attributes

static const Ionflux::Tools::TokenType TT_ATOM_TEXT
 Token type: Atom text.
static const Ionflux::Tools::TokenType TT_SPECIAL
 Token type: Special.
static const Ionflux::Tools::TokenType TT_FWS
 Token type: Folding whitespace.

Protected Attributes

bool validAddress
 Validity flag.
std::vector< Mailboxmailboxes
 Mailboxes which are part of this address.
std::string rawAddress
 Unparsed address.
std::string displayName
 Display name (mailbox or group).

Detailed Description

EMail address.

An email address, as defined in RFC 2822.


Constructor & Destructor Documentation

Ionflux::Tools::EMailAddress::EMailAddress  ) 
 

Constructor.

Construct new EMailAddress object.

Ionflux::Tools::EMailAddress::EMailAddress const EMailAddress initAddress  ) 
 

Constructor.

Construct new EMailAddress object.

Parameters:
initAddress EMail address.

Ionflux::Tools::EMailAddress::EMailAddress const std::string &  initRawAddress  ) 
 

Constructor.

Construct new EMailAddress object.

Parameters:
initRawAddress Unparsed address.

Ionflux::Tools::EMailAddress::~EMailAddress  )  [virtual]
 

Destructor.

Destruct EMailAddress object.


Member Function Documentation

void Ionflux::Tools::EMailAddress::clear  )  [virtual]
 

Clear.

Reset all fields.

std::string Ionflux::Tools::EMailAddress::getDisplayName  )  const [virtual]
 

Get display name (mailbox or group).

Returns:
Current value of display name (mailbox or group).

Mailbox Ionflux::Tools::EMailAddress::getMailbox unsigned int  mailboxIndex = 0  )  const [virtual]
 

Get mailbox.

Get the mailbox with specified index.

Parameters:
mailboxIndex Mailbox index.
Returns:
Mailbox with specified index, or an empty mailbox if mailbox with specified index does not exist.

const std::vector< Mailbox > & Ionflux::Tools::EMailAddress::getMailboxes  )  const [virtual]
 

Get mailboxes.

Get the mailboxes which are part of this address.

Returns:
Mailboxes.

unsigned int Ionflux::Tools::EMailAddress::getNumMailboxes  )  const [virtual]
 

Get number of mailboxes.

Get the number of mailboxes which are part of this address.

Returns:
Number of mailboxes.

std::string Ionflux::Tools::EMailAddress::getRawAddress  )  const [virtual]
 

Get unparsed address.

Returns:
Current value of unparsed address.

bool Ionflux::Tools::EMailAddress::isValid  )  const [virtual]
 

Validate address.

Check whether this email address is valid.

Returns:
true if the email address is valid, false otherwise.

EMailAddress & Ionflux::Tools::EMailAddress::operator= const std::string &  newRawAddress  )  [virtual]
 

Assignment operator.

Assign a string to an EMailAddress.

Parameters:
newRawAddress Unparsed email address.

EMailAddress & Ionflux::Tools::EMailAddress::operator= const EMailAddress newEMailAddress  )  [virtual]
 

Assignment operator.

Assign one EMailAddress to another EMailAddress.

Parameters:
newEMailAddress EMailAddress.

bool Ionflux::Tools::EMailAddress::parse const std::string &  newRawAddress = ""  )  [virtual]
 

Parse email address.

Parse an email address.

Parameters:
newRawAddress Unparsed email address.
Returns:
true on success, false otherwise.

void Ionflux::Tools::EMailAddress::printDebugInfo  )  const [virtual]
 

Print debug information.

Print useful information for debugging purposes.

void Ionflux::Tools::EMailAddress::setDisplayName const std::string &  newDisplayName  )  [virtual]
 

Set display name (mailbox or group).

Set new value of display name (mailbox or group).

Parameters:
newDisplayName New value of display name (mailbox or group).

void Ionflux::Tools::EMailAddress::setRawAddress const std::string &  newRawAddress  )  [virtual]
 

Set unparsed address.

Set new value of unparsed address.

Parameters:
newRawAddress New value of unparsed address.


Member Data Documentation

std::string Ionflux::Tools::EMailAddress::displayName [protected]
 

Display name (mailbox or group).

std::vector<Mailbox> Ionflux::Tools::EMailAddress::mailboxes [protected]
 

Mailboxes which are part of this address.

std::string Ionflux::Tools::EMailAddress::rawAddress [protected]
 

Unparsed address.

const Ionflux::Tools::TokenType Ionflux::Tools::EMailAddress::TT_ATOM_TEXT [static]
 

Initial value:

 {
    TokenType::USERTYPE_ID + 1301, 
    "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    "!#$%&'*+-/=?^_`{|}~", false, 0}
Token type: Atom text.

const Ionflux::Tools::TokenType Ionflux::Tools::EMailAddress::TT_FWS [static]
 

Initial value:

 {
    TokenType::USERTYPE_ID + 1303, " \t\r\n", false, 0}
Token type: Folding whitespace.

const Ionflux::Tools::TokenType Ionflux::Tools::EMailAddress::TT_SPECIAL [static]
 

Initial value:

 {
    TokenType::USERTYPE_ID + 1302, "()<>[]:;@\\,.\"", false, 1}
Token type: Special.

bool Ionflux::Tools::EMailAddress::validAddress [protected]
 

Validity flag.


The documentation for this class was generated from the following files:
Generated on Tue Mar 14 21:08:07 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6