|
VMime
|
#include <headerField.hpp>


Public Member Functions | |
| ~headerField () | |
| shared_ptr< component > | clone () const |
| void | copyFrom (const component &other) |
| headerField & | operator= (const headerField &other) |
| const std::vector< shared_ptr< component > > | getChildComponents () |
| void | setName (const string &name) |
| const string | getName () const |
| bool | isCustom () const |
| virtual shared_ptr< const headerFieldValue > | getValue () const |
| template<typename T> | |
| shared_ptr< const T > | getValue () const |
| virtual shared_ptr< headerFieldValue > | getValue () |
| template<typename T> | |
| shared_ptr< T > | getValue () |
| virtual void | setValue (shared_ptr< headerFieldValue > value) |
| virtual void | setValueConst (shared_ptr< const headerFieldValue > value) |
| virtual void | setValue (const headerFieldValue &value) |
| void | setValue (const string &value) |
| 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 shared_ptr< headerField > | parseNext (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
Protected Member Functions | |
| headerField () | |
| headerField (const string &fieldName) | |
| 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 &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
Protected Attributes | |
| string | m_name |
| shared_ptr< headerFieldValue > | m_value |
Base class for header fields.
|
protected |
References m_name.
Referenced by copyFrom(), header, and operator=().
| ~headerField | ( | ) |
|
virtual |
Clone this component.
Implements component.
References headerFieldFactory::getInstance(), and m_name.
Referenced by header.
|
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 |
Implements component.
Reimplemented in parameterizedHeaderField.
References component::component(), headerField(), and m_value.
Referenced by parameterizedHeaderField::copyFrom(), header, and operator=().
|
protectedvirtual |
Implements component.
Reimplemented in parameterizedHeaderField.
References m_name, and m_value.
Referenced by parameterizedHeaderField::generateImpl().
|
virtual |
Return the list of children of this component.
Implements component.
Reimplemented in parameterizedHeaderField.
References m_value.
Referenced by parameterizedHeaderField::getChildComponents(), and header.
|
virtual |
Get the number of bytes that will be used by this component when it is generated.
This may be a heuristically-derived estimate, but such an estimated size should always be larger than the actual generated size.
| ctx | generation context |
Reimplemented from component.
Reimplemented in parameterizedHeaderField.
References m_name, and m_value.
Referenced by parameterizedHeaderField::getGeneratedSize().
| const string getName | ( | ) | const |
Return the name of this field.
References m_name.
Referenced by header, headerFieldFactory::isValueTypeValid(), setValue(), setValue(), and setValueConst().
| shared_ptr< T > getValue | ( | ) |
Return the value object attached to this field, casted to the specified type.
References m_value.
|
virtual |
| shared_ptr< const T > getValue | ( | ) | const |
Return the read-only value object attached to this field, casted to the specified type.
References m_value.
|
virtual |
Return the read-only value object attached to this field.
References m_value.
Referenced by header, MDNHelper::isMDN(), and parameterizedHeaderField::parseImpl().
| bool isCustom | ( | ) | const |
| headerField & operator= | ( | const headerField & | other | ) |
References copyFrom(), and headerField().
Referenced by header.
|
protectedvirtual |
Reimplemented from component.
Reimplemented in parameterizedHeaderField.
References vmime::end(), and m_value.
|
static |
Parse a header field from a buffer.
| ctx | parsing context |
| 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 |
References vmime::end(), parserHelpers::findEOL(), headerFieldFactory::getInstance(), and parserHelpers::isSpace().
Referenced by header::parseImpl().
| void setName | ( | const string & | name | ) |
|
virtual |
Set the value of this field (reference version).
The value will be cloned.
| exceptions::bad_field_value_type | if the value type is not valid for this header field |
| value | new value |
References vmime::clone(), headerFieldFactory::getInstance(), getName(), and m_value.
| void setValue | ( | const string & | value | ) |
Set the value of this field given a character string.
| value | value string to parse |
References component::parse().
|
virtual |
Set the value of this field.
| exceptions::bad_field_value_type | if the value type is not valid for this header field |
| value | new value |
References headerFieldFactory::getInstance(), getName(), and m_value.
Referenced by body::setEncoding().
|
virtual |
Set the value of this field by cloning the specified value.
| exceptions::bad_field_value_type | if the value type is not valid for this header field |
| value | new value |
References vmime::clone(), headerFieldFactory::getInstance(), getName(), and m_value.
|
protected |
Referenced by clone(), generateImpl(), getGeneratedSize(), getName(), headerField(), headerField(), isCustom(), and setName().
|
protected |
Referenced by copyFrom(), generateImpl(), getChildComponents(), getGeneratedSize(), getValue(), getValue(), parseImpl(), setValue(), setValue(), and setValueConst().