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

Group Class Reference

Inheritance diagram for Group:

Address FieldBody Node List of all members.

Detailed Description

Group represents a group as described in RFC 2822. A group contains a group name and a (possibly empty) list of mailboxes. In Hunny MIME++, a Group object contains a string for the group name and a MailboxList object for the list of mailboxes.

In the document tree representation of a message, a Group object may be only an intermediate node, having both a parent and a single child node. Its parent node should be a Field or an AddressList object. Its child is a MailboxList object.


Public Member Functions

 Group ()
 Default constructor.
 Group (const Group &other)
 Copy constructor.
 Group (const String &str, Node *parent=0)
 Constructor that takes an initial string and parent node.
virtual ~Group ()
 Destructor.
const Groupoperator= (const Group &other)
 Assignment operator.
virtual void parse ()
 Parses the string representation.
virtual void assemble ()
 Assembles the string representation.
virtual Nodeclone () const
 Creates a copy of this object.
const StringgroupName () const
 Gets the group name.
void setGroupName (const String &name)
 Sets the group name.
MailboxListmailboxList () const
 Gets the mailbox list.

Static Public Member Functions

GroupnewGroup ()
 Creates a new instance.

Static Public Attributes

Group *(* sNewGroup )()
 Provides a class factory hook.


Constructor & Destructor Documentation

Group  ) 
 

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

Group const Group other  ) 
 

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

Parameters:
other Group instance to copy

Group const String str,
Node parent = 0
 

This constructor sets the Group 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

~Group  )  [virtual]
 

Destructor


Member Function Documentation

void assemble  )  [virtual]
 

This virtual function, inherited from Node, executes the assemble operation for Group objects. The assemble operation creates or updates the string representation from the broken-down representation. For Group objects, the assemble operation builds the string representation from the group name and mailbox list. Before it builds the string representation, this function calls the assemble() member function of its contained MailboxList object.

You should call this member function after you set or modify either the group name or the contained MailboxList object, and before you retrieve the string representation.

This function clears the is-modified flag.

Reimplemented from FieldBody.

Node * clone  )  const [virtual]
 

This virtual function, inherited from Node, creates a new Group object that has the same value as this Group object. The parent node of the new Group object is set to NULL.

Returns:
a copy of this object

Reimplemented from FieldBody.

const String & groupName  )  const
 

Gets the group name.

Returns:
group name

MailboxList & mailboxList  )  const
 

Gets the mailbox list.

Returns:
reference to the mailbox list

Group * newGroup  )  [static]
 

Creates a new Group object.

If the static data member sNewGroup is NULL, this member function creates a new Group object and returns it. Otherwise, newGroup() calls the user-supplied function that sNewGroup points to and returns the object created by that function.

Returns:
new Group instance
See also:
sNewGroup

const Group & operator= const Group other  ) 
 

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

Parameters:
other Group instance to copy

void parse  )  [virtual]
 

This virtual function, inherited from Node, executes the parse operation for Group objects. The parse operation creates or updates the broken-down representation from the string representation. For Group objects, the parse method parses the string representation to extract the group name and to create a MailboxList object from the list of mailboxes. This member function also calls the parse() member function of the MailboxList object it creates.

You should call this member function after you set or modify the string representation, and before you retrieve the group name or the mailbox list.

This function clears the is-modified flag.

Reimplemented from FieldBody.

void setGroupName const String name  ) 
 

Sets the group name.

Parameters:
name name of the group


Member Data Documentation

Group *(* sNewGroup)()=0 [static]
 

If sNewGroup is not NULL, it must point to a user-supplied function that returns a new instance of a subclass of Group.

See also:
newGroup()

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