A list of addresses. More...


Public Member Functions | |
| addressList () | |
| addressList (const addressList &addrList) | |
| ~addressList () | |
| ref< component > | clone () const |
| void | copyFrom (const component &other) |
| addressList & | operator= (const addressList &other) |
| addressList & | operator= (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< address > | getAddressAt (const int pos) |
| const ref< const address > | getAddressAt (const int pos) const |
| const std::vector< ref< const address > > | getAddressList () const |
| const std::vector< ref< address > > | getAddressList () |
| ref< mailboxList > | toMailboxList () 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 |
A list of addresses.
| addressList | ( | ) |
| addressList | ( | const addressList & | addrList | ) |
| ~addressList | ( | ) |
| void appendAddress | ( | ref< address > | addr | ) |
Add a address at the end of the list.
| addr | address to append |
Referenced by mailboxList::appendMailbox().
| ref< component > clone | ( | ) | const [virtual] |
Clone 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.
| std::bad_cast_exception | if the components are not of the same (dynamic) type |
| 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.
| 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.
| pos | position |
| ref< address > getAddressAt | ( | const int | pos | ) |
Return the address at the specified position.
| pos | position |
Referenced by mailboxList::getMailboxAt().
| int getAddressCount | ( | ) | const |
Return the number of addresses in the list.
Referenced by mailboxList::getMailboxCount().
| const std::vector< ref< address > > getAddressList | ( | ) |
Return the address list.
| const std::vector< ref< const address > > getAddressList | ( | ) | const |
| const std::vector< ref< const component > > getChildComponents | ( | ) | const [virtual] |
Return the list of children of this component (const version).
Implements component.
Referenced by mailboxList::getChildComponents().
| void insertAddressAfter | ( | const int | pos, | |
| ref< address > | addr | |||
| ) |
Insert a new address after the specified position.
| pos | position of the address before the new address | |
| addr | address to insert |
Insert a new address after the specified address.
| afterAddress | address after which the new address will be inserted | |
| addr | address to insert |
| 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.
| pos | position at which to insert the new address (0 to insert at the beginning of the list) | |
| addr | address to insert |
Insert a new address before the specified address.
| beforeAddress | address before which the new address will be inserted | |
| addr | address to insert |
| 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.
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.
| 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.
| pos | position of the address to remove |
| void removeAddress | ( | ref< address > | addr | ) |
Remove the specified address from the list.
| addr | address to remove |
| 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.
1.6.2