
Public Member Functions | |
| MailboxList () | |
| Default constructor. | |
| MailboxList (const MailboxList &other) | |
| Copy constructor. | |
| MailboxList (const String &str, Node *parent=0) | |
| Constructor that takes an initial string and parent node. | |
| virtual | ~MailboxList () |
| Destructor. | |
| const MailboxList & | operator= (const MailboxList &other) |
| Assignment operator. | |
| virtual void | parse () |
| Parses the string representation. | |
| virtual void | assemble () |
| Assembles the string representation. | |
| virtual Node * | clone () const |
| Creates a copy of this object. | |
| int | numMailboxes () const |
| Gets the number of mailboxes in the list. | |
| void | addMailbox (Mailbox *mailbox) |
| Adds a mailbox to the end of the list. | |
| void | deleteAllMailboxes () |
| Deletes all mailboxes in the list. | |
| Mailbox & | mailboxAt (int index) const |
| Gets the mailbox at the specified position in the list. | |
| void | insertMailboxAt (int index, Mailbox *mailbox) |
| Inserts a mailbox at the specified position in the list. | |
| Mailbox * | removeMailboxAt (int index) |
| Removes the mailbox at the specified position in the list. | |
Static Public Member Functions | |
| static MailboxList * | newMailboxList () |
| Creates a new instance. | |
Static Public Attributes | |
| static MailboxList *(* | sNewMailboxList )() |
| Provides a class factory hook. | |
Protected Member Functions | |
| void | _copyMailboxes (const MailboxList &list) |
| Copies all mailboxes from another list. | |
| void | _addMailbox (Mailbox *mailbox) |
| Adds a mailbox to the end of the list. | |
| void | _insertMailboxAt (int index, Mailbox *mailbox) |
| Inserts a mailbox at the specified position in the list. | |
| Mailbox * | _removeMailboxAt (int index) |
| Removes the mailbox at the specified position in the list. | |
| void | _deleteAllMailboxes () |
| Deletes all mailboxes in the list. | |
| MailboxList | ( | ) |
This constructor sets the MailboxList object's string representation to the empty string and sets its parent node to NULL.
| MailboxList | ( | const MailboxList & | other | ) |
This constructor performs a deep copy of its argument. The parent node of the new MailboxList object is set to NULL.
| other | MailboxList instance to copy |
| MailboxList | ( | const String & | str, | |
| Node * | parent = 0 | |||
| ) |
This constructor sets the MailboxList 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.
| str | initial value for the string representation | |
| parent | parent node for this object |
| ~MailboxList | ( | ) | [virtual] |
Destructor
| void _addMailbox | ( | Mailbox * | mailbox | ) | [protected] |
Same as addMailbox(), but does not set the is-modified flag.
| mailbox | Mailbox object to add |
| void _copyMailboxes | ( | const MailboxList & | list | ) | [protected] |
Copies the list of Mailbox objects from list. Assumes the list in this MailboxList object is emtpy. Does not set the is-modified flag.
| list | MailboxList object to copy Mailbox objects from |
| void _deleteAllMailboxes | ( | ) | [protected] |
| void _insertMailboxAt | ( | int | index, | |
| Mailbox * | mailbox | |||
| ) | [protected] |
Same as insertMailboxAt(), but does not set the is-modified flag.
| index | position in the list to insert the Mailbox object | |
| mailbox | Mailbox object to insert |
| Mailbox * _removeMailboxAt | ( | int | index | ) | [protected] |
Same as removeMailboxAt(), but does not set the is-modified flag.
| index | position of the Mailbox object to remove |
| void addMailbox | ( | Mailbox * | mailbox | ) |
Adds mailbox to the end of the list.
The MailboxList destructor deletes the Mailbox objects in the list.
| mailbox | Mailbox object to add |
| void assemble | ( | ) | [virtual] |
This virtual function, inherited from Node, executes the assemble operation for MailboxList objects. The assemble operation creates or updates the string representation from the broken-down representation. For MailboxList objects, the assemble operation builds the string representation from the list of contained Mailbox objects. Before it builds the string representation for the MailboxList object, the function first calls the assemble() member function of each Mailbox object in its list.
You should call this member function after you set or modify any of the contained Mailbox objects, and before you retrieve the string representation.
This function clears the is-modified flag.
Reimplemented from FieldBody.
| Node * clone | ( | ) | const [virtual] |
| void deleteAllMailboxes | ( | ) |
Removes and deletes all Mailbox objects in the list.
| void insertMailboxAt | ( | int | index, | |
| Mailbox * | mailbox | |||
| ) |
Inserts mailbox into the list at position index.
If index is zero, then the function inserts mailbox into the first position in the list. If index equals numMailboxes(), then the function inserts mailbox into the last position in the list. If index is less than numMailboxes(), then the function moves the Mailbox objects at position index or greater to a higher position in the list.
The MailboxList destructor deletes the Mailbox objects in the list.
The function's behavior is undefined if index is out of range. Valid values for index are 0 <= index <= numMailboxes().
| index | position in the list to insert the Mailbox object | |
| mailbox | Mailbox object to insert |
| Mailbox & mailboxAt | ( | int | index | ) | const |
Gets the Mailbox object at position index in the list.
The function's behavior is undefined if index is out of range. Valid values for index are 0 <= index < numMailboxes().
| index | position of the Mailbox object to get |
| MailboxList * newMailboxList | ( | ) | [static] |
Creates a new MailboxList object.
If the static data member sNewMailboxList is NULL, this member function creates a new MailboxList object and returns it. Otherwise, newMailboxList() calls the user-supplied function that sNewMailboxList points to and returns the object created by that function.
| int numMailboxes | ( | ) | const |
| const MailboxList & operator= | ( | const MailboxList & | other | ) |
Performs a deep copy of its argument. The parent node of this MailboxList object is not changed.
| other | MailboxList instance to copy |
| void parse | ( | ) | [virtual] |
This virtual function, inherited from Node, executes the parse operation for MailboxList objects. The parse operation creates or updates the broken-down representation from the string representation. For MailboxList objects, the parse operation parses the string representation to create a list of Mailbox objects. This member function also calls the parse() member function of each Mailbox object in its list.
You should call this member function after you set or modify the string representation, and before you access any of the contained Mailbox objects.
This function clears the is-modified flag.
Reimplemented from FieldBody.
| Mailbox * removeMailboxAt | ( | int | index | ) |
Removes the Mailbox object at position index from the list and returns it.
If index is less than numMailboxes()-1, then the function moves the Mailbox objects at position (index + 1) or greater to a lower position in the list.
The function's behavior is undefined if index is out of range. Valid values for index are 0 <= index < numMailboxes().
| index | position of the Mailbox object to remove |
| MailboxList *(* sNewMailboxList)()=0 | ( | ) | [static] |
If sNewMailboxList is not NULL, it must point to a user-supplied function that returns a new instance of a subclass of MailboxList.
Copyright © 2001-2009 Hunny Software, Inc. All rights reserved.