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

TransferEncodingType Class Reference

Inheritance diagram for TransferEncodingType:

FieldBody Node List of all members.

Detailed Description

TransferEncodingType represents a field body for the content-transfer-encoding header field as described in RFC 2045. TransferEncodingType provides member functions that allow you to set or get the content-transfer-encoding attribute as a string or as an enumerated value.


Public Member Functions

 TransferEncodingType ()
 Default constructor.
 TransferEncodingType (const TransferEncodingType &other)
 Copy constructor.
 TransferEncodingType (const String &str, Node *parent=0)
 Constructor that takes an initial string and parent node.
virtual ~TransferEncodingType ()
 Destructor.
const TransferEncodingTypeoperator= (const TransferEncodingType &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 Stringtype () const
 Gets the transfer encoding type.
void setType (const String &type)
 Sets the transfer encoding type.
EType asEnum () const
 Gets the transfer encoding type as an enumerated value.
void fromEnum (EType cte)
 Sets the transfer encoding type from an enumerated value.

Static Public Member Functions

TransferEncodingTypenewTransferEncodingType ()
 Creates a new instance.

Static Public Attributes

TransferEncodingType *(* sNewTransferEncodingType )()
 Provides a class factory hook.


Constructor & Destructor Documentation

TransferEncodingType  ) 
 

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

TransferEncodingType const TransferEncodingType other  ) 
 

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

Parameters:
other TransferEncodingType instance to copy

TransferEncodingType const String str,
Node parent = 0
 

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

~TransferEncodingType  )  [virtual]
 

Destructor


Member Function Documentation

TransferEncodingType::EType asEnum  )  const
 

Gets the content transfer encoding as an enumerated value.

If the content transfer encoding is non-standard, the function returns TransferEncodingType::UNKNOWN. You may call the member function type() to get the content transfer encoding, standard or non-standard, as a string.

Returns:
transfer encoding type as an enumerated value
See also:
type()

void assemble  )  [virtual]
 

This virtual function, inherited from Node, executes the assemble operation for TransferEncodingType objects. The assemble operation creates or updates the string representation from the broken-down representation. For TransferEncodingType objects, the assemble operation builds the string representation from the transfer encoding type value.

You should call this member function after you set or modify the transfer encoding type value, 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 TransferEncodingType object that has the same value as this TransferEncodingType object. The parent node of the new TransferEncodingType object is set to NULL.

Returns:
a copy of this object

Reimplemented from FieldBody.

void fromEnum EType  type  ) 
 

Sets the content transfer encoding from an enumerated value.

You may set the content transfer encoding to any string value, standard or non-standard, by using the member function setType().

Parameters:
type disposition type as an enumerated value
See also:
setType()

TransferEncodingType * newTransferEncodingType  )  [static]
 

Creates a new TransferEncodingType object.

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

Returns:
new TransferEncodingType instance
See also:
sNewTransferEncodingType

const TransferEncodingType & operator= const TransferEncodingType other  ) 
 

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

Parameters:
other TransferEncodingType instance to copy

void parse  )  [virtual]
 

This virtual function, inherited from Node, executes the parse operation for TransferEncodingType objects. The parse operation creates or updates the broken-down representation from the string representation. For TransferEncodingType objects, the parse operation parses the string representation to extract the transfer encoding type value.

You should call this member function after you set or modify the string representation, and before you access the transfer encoding type value.

This function clears the is-modified flag.

Reimplemented from FieldBody.

void setType const String type  ) 
 

Sets the transfer encoding type value

Parameters:
type transfer encoding type value
See also:
fromEnum()

const String & type  )  const
 

Gets the transfer encoding type value

Returns:
transfer encoding type value
See also:
asEnum()


Member Data Documentation

TransferEncodingType *(* sNewTransferEncodingType)()=0 [static]
 

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

See also:
newTransferEncodingType()

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