VMime
|
Public Member Functions | |
parameter (const string &name) | |
parameter (const string &name, const word &value) | |
parameter (const string &name, const string &value) | |
shared_ptr< component > | clone () const |
void | copyFrom (const component &other) |
parameter & | operator= (const parameter &other) |
const std::vector< shared_ptr < component > > | getChildComponents () |
const string & | getName () const |
const word & | getValue () const |
template<typename T > | |
const T | getValueAs () const |
void | setValue (const component &value) |
void | setValue (const word &value) |
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 |
virtual size_t | getGeneratedSize (const generationContext &ctx) |
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 &) | |
object & | operator= (const object &) |
virtual | ~object () |
Construct a parameter with no value.
Charset is set to the current locale charset.
name | parameter name |
Construct a parameter given a name and a value.
name | parameter name |
value | parameter value |
Construct a parameter given a name and a string value expressed in the current locale charset.
name | parameter name |
value | parameter value |
|
virtual |
|
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.
Referenced by parameter::operator=().
|
protectedvirtual |
Implements component.
References component::generate(), generationContext::getEncodedParameterValueMode(), generationContext::getMaxLineLength(), parserHelpers::isAscii(), parserHelpers::isPrint(), vmime::NEW_LINE_SEQUENCE, vmime::NEW_LINE_SEQUENCE_LENGTH, generationContext::PARAMETER_VALUE_NO_ENCODING, generationContext::PARAMETER_VALUE_RFC2047_ONLY, and generationContext::PARAMETER_VALUE_RFC2231_AND_RFC2047.
|
virtual |
Return the list of children of this component.
Implements component.
const string & getName | ( | ) | const |
Return the name of this parameter.
const word & getValue | ( | ) | const |
Return the raw value of this parameter.
const T getValueAs | ( | ) | const |
Return the value of this object in the specified type.
For example, the following code:
getParameter("creation-date")->getValueAs <vmime::dateTime>()
is equivalent to:
shared_ptr <vmime::word> rawValue = getParameter("creation-date");
vmime::dateTime theDate; theDate.parse(rawValue->getBuffer());
T | type to which convert the value |
References parameter::copyFrom().
|
protectedvirtual |
Reimplemented from component.
References vmime::end(), context::getInternationalizedEmailSupport(), vmime::charsets::US_ASCII, and vmime::charsets::UTF_8.
void setValue | ( | const component & | value | ) |
Set the value of this parameter.
value | new value |
References component::generate(), and vmime::charsets::US_ASCII.
void setValue | ( | const word & | value | ) |
Set the raw value of this parameter.
value | new value |