VMime
messageId Class Reference

#include <messageId.hpp>

Inheritance diagram for messageId:
Collaboration diagram for messageId:

Public Member Functions

 messageId ()
 messageId (const string &id)
 messageId (const messageId &mid)
 messageId (const string &left, const string &right)
const stringgetLeft () const
void setLeft (const string &left)
const stringgetRight () const
void setRight (const string &right)
messageIdoperator= (const string &id)
bool operator== (const messageId &mid) const
bool operator!= (const messageId &mid) const
const string getId () const
shared_ptr< componentclone () const
void copyFrom (const component &other)
messageIdoperator= (const messageId &other)
const std::vector< shared_ptr< component > > getChildComponents ()
Public Member Functions inherited from headerFieldValue
size_t getGeneratedSize (const generationContext &ctx)
Public Member Functions inherited from component
 component ()
virtual ~component ()
void parse (const string &buffer)
void parse (const parsingContext &ctx, const string &buffer)
void parse (shared_ptr< utility::inputStream > inputStream, const size_t length)
void parse (const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL)
void parse (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL)
void parse (shared_ptr< utility::inputStream > inputStream, const size_t position, const size_t end, size_t *newPosition=NULL)
void parse (const parsingContext &ctx, shared_ptr< utility::inputStream > inputStream, const size_t position, const size_t end, size_t *newPosition=NULL)
virtual const string generate (const size_t maxLineLength=lineLengthLimits::infinite, const size_t curLinePos=0) const
virtual void generate (utility::outputStream &outputStream, const size_t curLinePos=0, size_t *newLinePos=NULL) const
virtual void generate (const generationContext &ctx, utility::outputStream &outputStream, const size_t curLinePos=0, size_t *newLinePos=NULL) const
size_t getParsedOffset () const
size_t getParsedLength () const

Static Public Member Functions

static messageId generateId ()

Protected Member Functions

void parseImpl (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL)
void generateImpl (const generationContext &ctx, utility::outputStream &os, const size_t curLinePos=0, size_t *newLinePos=NULL) const
Protected Member Functions inherited from component
void setParsedBounds (const size_t start, const size_t end)
virtual void parseImpl (const parsingContext &ctx, shared_ptr< utility::parserInputStreamAdapter > parser, const size_t position, const size_t end, size_t *newPosition=NULL)
Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Static Protected Member Functions

static shared_ptr< messageIdparseNext (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition)

Detailed Description

Message identifier (basic type).

Constructor & Destructor Documentation

◆ messageId() [1/4]

◆ messageId() [2/4]

messageId ( const string & id)

References component::parse().

◆ messageId() [3/4]

messageId ( const messageId & mid)

References messageId().

◆ messageId() [4/4]

messageId ( const string & left,
const string & right )

Member Function Documentation

◆ clone()

shared_ptr< component > clone ( ) const
virtual

Clone this component.

Returns
a copy of this component

Implements component.

Referenced by messageIdSequence.

◆ copyFrom()

void copyFrom ( const component & other)
virtual

Replace data in this component by data in other component.

Both components must be of the same type.

Exceptions
std::bad_cast_exceptionif the components are not of the same (dynamic) type
Parameters
otherother component to copy data from

Implements component.

References messageId().

Referenced by messageIdSequence, and operator=().

◆ generateId()

messageId generateId ( )
static

Generate a random message identifier.

Returns
randomly created message identifier

References platform::getHandler(), random::getNext(), random::getProcess(), random::getTime(), and messageId().

Referenced by htmlTextPart::addObject(), messageIdSequence, and transport::processHeader().

◆ generateImpl()

void generateImpl ( const generationContext & ctx,
utility::outputStream & os,
const size_t curLinePos = 0,
size_t * newLinePos = NULL ) const
protectedvirtual

◆ getChildComponents()

const std::vector< shared_ptr< component > > getChildComponents ( )
virtual

Return the list of children of this component.

Returns
list of child components

Implements component.

Referenced by messageIdSequence.

◆ getId()

const string getId ( ) const

Return the message identifier constructed by using the right part and the left part, separated by a '@' character.

Returns
full message identifier

Referenced by htmlTextPart::addObject(), messageIdSequence, and htmlTextPart::parse().

◆ getLeft()

const string & getLeft ( ) const

Return the left part of the message identifier.

Returns
left part of message identifier

Referenced by messageIdSequence.

◆ getRight()

const string & getRight ( ) const

Return the right part of the message identifier.

Returns
right part of message identifier

Referenced by messageIdSequence.

◆ operator!=()

bool operator!= ( const messageId & mid) const

References messageId().

Referenced by messageIdSequence.

◆ operator=() [1/2]

messageId & operator= ( const messageId & other)

References copyFrom(), and messageId().

◆ operator=() [2/2]

messageId & operator= ( const string & id)

References messageId(), and component::parse().

Referenced by messageIdSequence.

◆ operator==()

bool operator== ( const messageId & mid) const

References messageId().

Referenced by messageIdSequence.

◆ parseImpl()

void parseImpl ( const parsingContext & ctx,
const string & buffer,
const size_t position,
const size_t end,
size_t * newPosition = NULL )
protectedvirtual

◆ parseNext()

shared_ptr< messageId > parseNext ( const parsingContext & ctx,
const string & buffer,
const size_t position,
const size_t end,
size_t * newPosition )
staticprotected

Parse a message-id from an input buffer.

Parameters
bufferinput buffer
positionposition in the input buffer
endend position in the input buffer
newPositionwill receive the new position in the input buffer
Returns
a new message-id object, or null if no more message-id can be parsed from the input buffer

References vmime::begin(), vmime::end(), and parserHelpers::isSpace().

Referenced by messageIdSequence, and messageIdSequence::parseImpl().

◆ setLeft()

void setLeft ( const string & left)

Set the left part of the message identifier.

Parameters
leftleft part of message identifier

Referenced by messageIdSequence.

◆ setRight()

void setRight ( const string & right)

Set the right part of the message identifier.

Parameters
rightright part of message identifier

Referenced by messageIdSequence.


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