This abstract class is the base for all the classes in the library. More...


Public Member Functions | |
| component () | |
| virtual | ~component () |
| void | parse (const string &buffer) |
| virtual void | parse (const string &buffer, const string::size_type position, const string::size_type end, string::size_type *newPosition=NULL)=0 |
| const string | generate (const string::size_type maxLineLength=lineLengthLimits::infinite, const string::size_type curLinePos=0) const |
| virtual void | generate (utility::outputStream &os, const string::size_type maxLineLength=lineLengthLimits::infinite, const string::size_type curLinePos=0, string::size_type *newLinePos=NULL) const =0 |
| virtual ref< component > | clone () const =0 |
| virtual void | copyFrom (const component &other)=0 |
| string::size_type | getParsedOffset () const |
| string::size_type | getParsedLength () const |
| const std::vector< ref < component > > | getChildComponents () |
| virtual const std::vector< ref < const component > > | getChildComponents () const =0 |
Protected Member Functions | |
| void | setParsedBounds (const string::size_type start, const string::size_type end) |
This abstract class is the base for all the classes in the library.
It defines the methods for parsing and generating all the components.
| component | ( | ) |
| ~component | ( | ) | [virtual] |
| virtual ref<component> clone | ( | ) | const [pure virtual] |
Clone this component.
Implemented in address, addressList, body, bodyPart, charset, contentDisposition, datetime, disposition, encoding, header, headerField, mailbox, mailboxGroup, mailboxList, mediaType, messageId, messageIdSequence, parameter, path, relay, text, and word.
Referenced by headerField::setValue().
| virtual void copyFrom | ( | const component & | other | ) | [pure virtual] |
Replace data in this component by data in other component.
Both components must be of the same type.
| std::bad_cast_exception | if the components are not of the same (dynamic) type |
| other | other component to copy data from |
Implemented in addressList, body, bodyPart, charset, contentDisposition, datetime, disposition, encoding, header, headerField, mailbox, mailboxGroup, mailboxList, mediaType, messageId, messageIdSequence, parameter, parameterizedHeaderField, path, relay, text, and word.
| virtual void generate | ( | utility::outputStream & | os, | |
| const string::size_type | maxLineLength = lineLengthLimits::infinite, |
|||
| const string::size_type | curLinePos = 0, |
|||
| string::size_type * | newLinePos = NULL | |||
| ) | const [pure virtual] |
Generate RFC-2822/MIME data for this component.
| os | output stream | |
| maxLineLength | maximum line length for output | |
| curLinePos | length of the current line in the output buffer | |
| newLinePos | will receive the new line position (length of the last line written) |
Implemented in addressList, body, bodyPart, charset, contentDisposition, datetime, disposition, encoding, header, headerField, mailbox, mailboxGroup, mailboxList, mediaType, message, messageId, messageIdSequence, parameter, parameterizedHeaderField, path, relay, text, and word.
| const string generate | ( | const string::size_type | maxLineLength = lineLengthLimits::infinite, |
|
| const string::size_type | curLinePos = 0 | |||
| ) | const |
Generate RFC-2822/MIME data for this component.
| maxLineLength | maximum line length for output | |
| curLinePos | length of the current line in the output buffer |
Reimplemented in message.
Referenced by parameter::setValue().
| virtual const std::vector<ref <const component> > getChildComponents | ( | ) | const [pure virtual] |
Return the list of children of this component (const version).
Implemented in addressList, body, bodyPart, charset, contentDisposition, datetime, disposition, encoding, header, headerField, mailbox, mailboxGroup, mailboxList, mediaType, messageId, messageIdSequence, parameter, parameterizedHeaderField, path, relay, text, and word.
| const std::vector< ref< component > > getChildComponents | ( | ) |
Return the list of children of this component.
References vmime::count().
| string::size_type getParsedLength | ( | ) | const |
Return the length of this component in the parsed message contents.
| string::size_type getParsedOffset | ( | ) | const |
Return the start position of this component in the parsed message contents.
| virtual void parse | ( | const string & | buffer, | |
| const string::size_type | position, | |||
| const string::size_type | end, | |||
| string::size_type * | newPosition = NULL | |||
| ) | [pure virtual] |
Parse RFC-822/MIME data for this component.
| buffer | input buffer | |
| position | current position in the input buffer | |
| end | end position in the input buffer | |
| newPosition | will receive the new position in the input buffer |
Implemented in addressList, body, bodyPart, charset, contentDisposition, datetime, disposition, encoding, header, headerField, mailbox, mailboxGroup, mailboxList, mediaType, messageId, messageIdSequence, parameter, parameterizedHeaderField, path, relay, text, and word.
| void parse | ( | const string & | buffer | ) |
Parse RFC-822/MIME data for this component.
| buffer | input buffer |
Reimplemented in message.
| void setParsedBounds | ( | const string::size_type | start, | |
| const string::size_type | end | |||
| ) | [protected] |
1.6.2