addressList Class Reference

A list of addresses. More...

Inheritance diagram for addressList:
Inheritance graph
[legend]
Collaboration diagram for addressList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 addressList ()
 addressList (const addressList &addrList)
 ~addressList ()
ref< componentclone () const
void copyFrom (const component &other)
addressListoperator= (const addressList &other)
addressListoperator= (const mailboxList &other)
const std::vector< ref< const
component > > 
getChildComponents () const
void appendAddress (ref< address > addr)
void insertAddressBefore (ref< address > beforeAddress, ref< address > addr)
void insertAddressBefore (const int pos, ref< address > addr)
void insertAddressAfter (ref< address > afterAddress, ref< address > addr)
void insertAddressAfter (const int pos, ref< address > addr)
void removeAddress (ref< address > addr)
void removeAddress (const int pos)
void removeAllAddresses ()
int getAddressCount () const
bool isEmpty () const
ref< addressgetAddressAt (const int pos)
const ref< const addressgetAddressAt (const int pos) const
const std::vector< ref< const
address > > 
getAddressList () const
const std::vector< ref< address > > getAddressList ()
ref< mailboxListtoMailboxList () const
void parse (const string &buffer, const string::size_type position, const string::size_type end, string::size_type *newPosition=NULL)
void generate (utility::outputStream &os, const string::size_type maxLineLength=lineLengthLimits::infinite, const string::size_type curLinePos=0, string::size_type *newLinePos=NULL) const

Detailed Description

A list of addresses.


Constructor & Destructor Documentation

addressList (  ) 
addressList ( const addressList addrList  ) 
~addressList (  ) 

Member Function Documentation

void appendAddress ( ref< address addr  ) 

Add a address at the end of the list.

Parameters:
addr address to append

Referenced by mailboxList::appendMailbox().

ref< component > clone (  )  const [virtual]

Clone this component.

Returns:
a copy of this component

Implements component.

Referenced by mailboxList::toAddressList().

void copyFrom ( const component other  )  [virtual]

Replace data in this component by data in other component.

Both components must be of the same type.

Exceptions:
std::bad_cast_exception if the components are not of the same (dynamic) type
Parameters:
other other component to copy data from

Implements component.

void generate ( utility::outputStream os,
const string::size_type  maxLineLength = lineLengthLimits::infinite,
const string::size_type  curLinePos = 0,
string::size_type *  newLinePos = NULL 
) const [virtual]

Generate RFC-2822/MIME data for this component.

Parameters:
os output stream
maxLineLength maximum line length for output
curLinePos length of the current line in the output buffer
newLinePos will receive the new line position (length of the last line written)

Implements component.

Referenced by mailboxList::generate().

const ref< const address > getAddressAt ( const int  pos  )  const

Return the address at the specified position.

Parameters:
pos position
Returns:
address at position 'pos'
ref< address > getAddressAt ( const int  pos  ) 

Return the address at the specified position.

Parameters:
pos position
Returns:
address at position 'pos'

Referenced by mailboxList::getMailboxAt().

int getAddressCount (  )  const

Return the number of addresses in the list.

Returns:
number of addresses

Referenced by mailboxList::getMailboxCount().

const std::vector< ref< address > > getAddressList (  ) 

Return the address list.

Returns:
list of addresses
const std::vector< ref< const address > > getAddressList (  )  const

Return the address list.

Returns:
list of addresses

Referenced by mailboxList::getMailboxList().

const std::vector< ref< const component > > getChildComponents (  )  const [virtual]

Return the list of children of this component (const version).

Returns:
list of child components

Implements component.

Referenced by mailboxList::getChildComponents().

void insertAddressAfter ( const int  pos,
ref< address addr 
)

Insert a new address after the specified position.

Parameters:
pos position of the address before the new address
addr address to insert
void insertAddressAfter ( ref< address afterAddress,
ref< address addr 
)

Insert a new address after the specified address.

Parameters:
afterAddress address after which the new address will be inserted
addr address to insert
Exceptions:
exceptions::no_such_address if the address is not in the list

Referenced by mailboxList::insertMailboxAfter().

void insertAddressBefore ( const int  pos,
ref< address addr 
)

Insert a new address before the specified position.

Parameters:
pos position at which to insert the new address (0 to insert at the beginning of the list)
addr address to insert
void insertAddressBefore ( ref< address beforeAddress,
ref< address addr 
)

Insert a new address before the specified address.

Parameters:
beforeAddress address before which the new address will be inserted
addr address to insert
Exceptions:
exceptions::no_such_address if the address is not in the list

Referenced by mailboxList::insertMailboxBefore().

bool isEmpty (  )  const

Tests whether the list of addresses is empty.

Returns:
true if there is no address, false otherwise

Referenced by mailboxList::isEmpty().

addressList & operator= ( const mailboxList other  ) 
addressList & operator= ( const addressList other  ) 
void parse ( const string buffer,
const string::size_type  position,
const string::size_type  end,
string::size_type *  newPosition = NULL 
) [virtual]

Parse RFC-822/MIME data for this component.

Parameters:
buffer input buffer
position current position in the input buffer
end end position in the input buffer
newPosition will receive the new position in the input buffer

Implements component.

Referenced by mailboxList::parse().

void removeAddress ( const int  pos  ) 

Remove the address at the specified position.

Parameters:
pos position of the address to remove
void removeAddress ( ref< address addr  ) 

Remove the specified address from the list.

Parameters:
addr address to remove
Exceptions:
exceptions::no_such_address if the address is not in the list

Referenced by mailboxList::removeMailbox().

void removeAllAddresses (  ) 

Remove all addresses from the list.

Referenced by mailboxList::removeAllMailboxes().

ref< mailboxList > toMailboxList (  )  const

Return a list of mailboxes.

If some addresses are actually groups, mailboxes are recursively extracted from these groups.

Returns:
list of mailboxes

The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2