VMime
plainTextPart Class Reference

#include <plainTextPart.hpp>

Inheritance diagram for plainTextPart:
Collaboration diagram for plainTextPart:

Public Member Functions

 plainTextPart ()
 ~plainTextPart ()
const mediaType getType () const
const charsetgetCharset () const
void setCharset (const charset &ch)
const shared_ptr< const contentHandlergetText () const
void setText (shared_ptr< contentHandler > text)
size_t getPartCount () const
void generateIn (shared_ptr< bodyPart > message, shared_ptr< bodyPart > parent) const
void parse (shared_ptr< const bodyPart > message, shared_ptr< const bodyPart > parent, shared_ptr< const bodyPart > textPart)
Public Member Functions inherited from textPart
virtual ~textPart ()

Additional Inherited Members

Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Detailed Description

Text part of type 'text/plain'.

Constructor & Destructor Documentation

◆ plainTextPart()

plainTextPart ( )

◆ ~plainTextPart()

Member Function Documentation

◆ generateIn()

void generateIn ( shared_ptr< bodyPart > message,
shared_ptr< bodyPart > parent ) const
virtual

Generate the text part(s) into the specified message.

Parameters
messagethe message
parentbody part into which generate this part

Implements textPart.

References encoding::decide(), vmime::mediaTypes::TEXT, vmime::mediaTypes::TEXT_PLAIN, and encoding::USAGE_TEXT.

◆ getCharset()

const charset & getCharset ( ) const
virtual

Return the charset used to encode text in the text part.

Returns
text charset

Implements textPart.

◆ getPartCount()

size_t getPartCount ( ) const
virtual

Return the actual body parts this text part is composed of.

For example, HTML parts are composed of two parts: one "text/html" part, and the plain text part "text/plain".

Returns
number of body parts

Implements textPart.

◆ getText()

const shared_ptr< const contentHandler > getText ( ) const
virtual

Return the text contained in the part.

Returns
text of the part

Implements textPart.

◆ getType()

const mediaType getType ( ) const
virtual

Return the type of text part (eg: "text/html").

Returns
type of text part

Implements textPart.

References vmime::mediaTypes::TEXT, and vmime::mediaTypes::TEXT_PLAIN.

◆ parse()

void parse ( shared_ptr< const bodyPart > message,
shared_ptr< const bodyPart > parent,
shared_ptr< const bodyPart > textPart )
virtual

Parse the text part(s) from the specified message.

Parameters
messagemessage containing the text part
parentpart containing the text part
textPartactual text part

Implements textPart.

References vmime::clone(), vmime::fields::CONTENT_TYPE, and contentTypeField::getCharset().

◆ setCharset()

void setCharset ( const charset & ch)
virtual

Set the charset used to encode text in the text part.

Parameters
chtext charset

Implements textPart.

◆ setText()

void setText ( shared_ptr< contentHandler > text)
virtual

Set the text contained in the part.

Parameters
texttext of the part

Implements textPart.

References vmime::clone().


The documentation for this class was generated from the following files: