Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

Address Class Reference

Inheritance diagram for Address:

FieldBody Node Group Mailbox List of all members.

Detailed Description

Address represents a mail address as described in RFC 2822. You may not create instances of Address, since Address is an abstract base class. Instead, you create instances of Mailbox or Group, which are subclasses of Address.

If the string representation assigned to an Address is improperly formed, the parse operation will fail. To determine if the parse operation failed, call the member function isValid().


Public Member Functions

virtual ~Address ()
 Destructor.
bool isValid () const
 Returns true if the address is valid.

Protected Member Functions

 Address ()
 Default constructor.
 Address (const Address &other)
 Copy constructor.
 Address (const String &str, Node *parent=0)
 Constructor that takes an initial string and parent node.
const Addressoperator= (const Address &other)
 Assignment operator.

Protected Attributes

bool mIsValid
 Set to true if the parse operation was successful.


Constructor & Destructor Documentation

~Address  )  [virtual]
 

Destructor

Address  )  [protected]
 

This constructor sets the Address object's string representation to the empty string and sets its parent node to NULL.

Address const Address other  )  [protected]
 

This constructor performs a deep copy of its argument. The parent node of the new Address object is set to NULL.

Parameters:
other Address instance to copy

Address const String str,
Node parent = 0
[protected]
 

This constructor sets the Address object's string representation to str and sets its parent node to parent.

Normally, you call the virtual function parse() immediately after this constructor to create the broken-down representation.

Parameters:
str initial value for the string representation
parent parent node for this object


Member Function Documentation

bool isValid  )  const
 

Returns true value if the last parse operation was successful. Returns false if the last parse operation failed (bad address) or the parse() member function was never called.

Returns:
true if last parse operation succeeded

const Address & operator= const Address other  )  [protected]
 

Performs a deep copy of its argument. The parent node of this Address object is not changed.

Parameters:
other Address instance to copy

Copyright © 2001-2007 Hunny Software, Inc. All rights reserved.