VMime
messageIdSequence Class Reference
Inheritance diagram for messageIdSequence:
Collaboration diagram for messageIdSequence:

Public Member Functions

 messageIdSequence ()
 
 messageIdSequence (const messageIdSequence &midSeq)
 
 ~messageIdSequence ()
 
shared_ptr< componentclone () const
 
void copyFrom (const component &other)
 
messageIdSequenceoperator= (const messageIdSequence &other)
 
const std::vector< shared_ptr
< component > > 
getChildComponents ()
 
void appendMessageId (shared_ptr< messageId > mid)
 
void insertMessageIdBefore (shared_ptr< messageId > beforeMid, shared_ptr< messageId > mid)
 
void insertMessageIdBefore (const size_t pos, shared_ptr< messageId > mid)
 
void insertMessageIdAfter (shared_ptr< messageId > afterMid, shared_ptr< messageId > mid)
 
void insertMessageIdAfter (const size_t pos, shared_ptr< messageId > mid)
 
void removeMessageId (shared_ptr< messageId > mid)
 
void removeMessageId (const size_t pos)
 
void removeAllMessageIds ()
 
size_t getMessageIdCount () const
 
bool isEmpty () const
 
const shared_ptr< messageIdgetMessageIdAt (const size_t pos)
 
const shared_ptr< const messageIdgetMessageIdAt (const size_t pos) const
 
const std::vector< shared_ptr
< const messageId > > 
getMessageIdList () const
 
const std::vector< shared_ptr
< messageId > > 
getMessageIdList ()
 
- 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
 

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 ()
 

Detailed Description

A list of message identifiers (basic type).

Constructor & Destructor Documentation

Member Function Documentation

void appendMessageId ( shared_ptr< messageId mid)

Add a message-id at the end of the list.

Parameters
midmessage-id to append
shared_ptr< component > clone ( ) const
virtual

Clone this component.

Returns
a copy of this component

Implements component.

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 vmime::clone(), and messageIdSequence::removeAllMessageIds().

Referenced by messageIdSequence::messageIdSequence(), and messageIdSequence::operator=().

void generateImpl ( const generationContext ctx,
utility::outputStream os,
const size_t  curLinePos = 0,
size_t newLinePos = NULL 
) const
protectedvirtual
const std::vector< shared_ptr< component > > getChildComponents ( )
virtual

Return the list of children of this component.

Returns
list of child components

Implements component.

References vmime::copy_vector().

const shared_ptr< messageId > getMessageIdAt ( const size_t  pos)

Return the message-id at the specified position.

Parameters
posposition
Returns
message-id at position 'pos'
const shared_ptr< const messageId > getMessageIdAt ( const size_t  pos) const

Return the message-id at the specified position.

Parameters
posposition
Returns
message-id at position 'pos'
size_t getMessageIdCount ( ) const

Return the number of message-ides in the list.

Returns
number of message-ides
const std::vector< shared_ptr< const messageId > > getMessageIdList ( ) const

Return the message-id list.

Returns
list of message-ids
const std::vector< shared_ptr< messageId > > getMessageIdList ( )

Return the message-id list.

Returns
list of message-ids
void insertMessageIdAfter ( shared_ptr< messageId afterMid,
shared_ptr< messageId mid 
)

Insert a new message-id after the specified message-id.

Parameters
afterMidmessage-id after which the new message-id will be inserted
midmessage-id to insert
Exceptions
exceptions::no_such_message_idif the message-id is not in the list
void insertMessageIdAfter ( const size_t  pos,
shared_ptr< messageId mid 
)

Insert a new message-id after the specified position.

Parameters
posposition of the message-id before the new message-id
midmessage-id to insert
void insertMessageIdBefore ( shared_ptr< messageId beforeMid,
shared_ptr< messageId mid 
)

Insert a new message-id before the specified message-id.

Parameters
beforeMidmessage-id before which the new message-id will be inserted
midmessage-id to insert
Exceptions
exceptions::no_such_messageidif the message-id is not in the list
void insertMessageIdBefore ( const size_t  pos,
shared_ptr< messageId mid 
)

Insert a new message-id before the specified position.

Parameters
posposition at which to insert the new message-id (0 to insert at the beginning of the list)
midmessage-id to insert
bool isEmpty ( ) const

Tests whether the list of message-ides is empty.

Returns
true if there is no message-id, false otherwise
messageIdSequence & operator= ( const messageIdSequence other)
void parseImpl ( const parsingContext ctx,
const string buffer,
const size_t  position,
const size_t  end,
size_t newPosition = NULL 
)
protectedvirtual

Reimplemented from component.

References vmime::end(), and messageId::parseNext().

void removeAllMessageIds ( )

Remove all message-ids from the list.

Referenced by messageIdSequence::copyFrom(), and messageIdSequence::~messageIdSequence().

void removeMessageId ( shared_ptr< messageId mid)

Remove the specified message-id from the list.

Parameters
midmessage-id to remove
Exceptions
exceptions::no_such_message_idif the message-id is not in the list
void removeMessageId ( const size_t  pos)

Remove the message-id at the specified position.

Parameters
posposition of the message-id to remove

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