Inheritance diagram for Field:

In the document tree representation of a message, a Field object is always an intermediate node, having a parent node and a single child node. The parent node is the Headers object that contains it. The child node is the FieldBody object it contains.
To get or set the field name, use the member functions fieldName() and setFieldName(). To get or set the contained FieldBody object, use fieldBody() and setFieldBody().
Public Member Functions | |
| Field () | |
| Default constructor. | |
| Field (const Field &other) | |
| Copy constructor. | |
| Field (const String &str, Node *parent=0) | |
| Constructor that takes an initial string and parent node. | |
| virtual | ~Field () |
| Destructor. | |
| const Field & | operator= (const Field &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. | |
| const String & | fieldName () const |
| Gets the field name. | |
| void | setFieldName (const String &str) |
| Sets the field name. | |
| FieldBody & | fieldBody () const |
| Gets the field body. | |
| void | setFieldBody (class FieldBody *fieldBody) |
| Sets the field body. | |
Static Public Member Functions | |
| FieldBody * | createFieldBody (const String &fieldName, const String &fieldBody, Node *parent) |
| Creates an instance of a subclass of FieldBody. | |
| FieldBody * | _createFieldBody (const String &fieldName, const String &fieldBody, Node *parent) |
| Default factory function for creating FieldBody instances. | |
| Field * | newField () |
| Creates a new instance. | |
Static Public Attributes | |
| FieldBody *(* | sCreateFieldBody )(const String &fieldName, const String &fieldBody, Node *parent) |
| Factory function hook for creating FieldBody instances. | |
| Field *(* | sNewField )() |
| Provides a class factory hook. | |
Protected Member Functions | |
| void | _setFieldBody (class FieldBody *aFieldBody) |
| Sets the field body. | |
|
|
This constructor sets the Field object's string representation to the empty string and sets its parent node to NULL. |
|
|
This constructor performs a deep copy of its argument. The parent node of the new Field object is set to NULL.
|
|
||||||||||||
|
This constructor sets the Field 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.
|
|
|
Destructor |
|
||||||||||||||||
|
This static member function is the default factory function for creating FieldBody instances. For a full discussion, see createFieldBody(). |
|
|
Sets the FieldBody object contained by this object. This function differs from setFieldBody() in that it does not set the is-modified flag.
|
|
|
This virtual function, inherited from Node, executes the assemble operation for Field objects. The assemble operation creates or updates the string representation from the broken-down representation. For Field objects, the assemble operation builds the string representation from the field name and the string representation of the contained FieldBody object. Before it builds the string representation, this function calls the assemble() member function of its contained FieldBody object. You should call this member function after you set or modify either the field name or the contained FieldBody object, and before you retrieve the string representation. This function clears the is-modified flag. Implements Node. |
|
|
This virtual function, inherited from Node, creates a new Field object that has the same value as this Field object. The parent node of the new Field object is set to NULL.
Implements Node. |
|
||||||||||||||||
|
The parse() member function calls createFieldBody() to create an instance of a subclass of FieldBody. createFieldBody() examines the field name and creates a subclass of FieldBody that is appropriate for that field. You may create subclasses of some library classes. To make the library create instances of those subclasses, you must install a factory function, using the Field::sCreateFieldBody hook. If sCreateFieldBody is not NULL, then createFieldBody() calls the function it points to. Otherwise, createFieldBody() calls the default factory function _createFieldBody().
|
|
|
Gets the field body.
|
|
|
Gets the field name.
|
|
|
Creates a new Field object. If the static data member sNewField is NULL, this member function creates a new Field object and returns it. Otherwise, newField() calls the user-supplied function that sNewField points to and returns the object created by that function.
|
|
|
Performs a deep copy of its argument. The parent node of this Field object is not changed.
|
|
|
This virtual function, inherited from Node, executes the parse operation for Field objects. The parse operation creates or updates the broken-down representation from the string representation. For Field objects, the parse operation updates the value of the field name string and creates an instance of the appropriate subclass of FieldBody. This member function also calls the parse() member function of the FieldBody object it creates. You should call this member function after you set or modify the string representation, and before you access the field name or field body. This function clears the is-modified flag. Implements Node. |
|
|
Sets the field body.
|
|
|
Sets the field name.
|
|
|
This function pointer points to a user-supplied factory function for creating FieldBody instances. For a full discussion, see createFieldBody(). |
|
|
If sNewField is not NULL, it must point to a user-supplied function that returns a new instance of a subclass of Field.
|
Copyright © 2001-2007 Hunny Software, Inc. All rights reserved.