SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Contains a bounds-checked vector of RWMimeParameter objects. More...
#include <rw/mime/RWMimeParameterList.h>
Public Member Functions | |
RWMimeParameterList (void) | |
RWMimeParameterList (const RWMimeParameterList &second) | |
~RWMimeParameterList (void) | |
RWCString | asString (void) const |
size_t | findParameter (const RWCString &name, size_t start=0) const |
void | fromString (const RWCString ¶mString) |
RWMimeParameter | getParameter (size_t i) const |
size_t | getParameterCount (void) const |
RWCString | getParameterValue (const RWCString &name, size_t start=0) const |
void | insertParameter (const RWMimeParameter ¶meter) |
RWMimeParameterList & | operator= (const RWMimeParameterList &second) |
void | removeAllParameters (void) |
void | removeParameter (size_t position) |
void | setParameterValue (const RWCString &name, const RWCString &value, size_t start=0) |
Friends | |
bool | operator== (const RWMimeParameterList &first, const RWMimeParameterList &second) |
RWMimeParameterList contains a bounds-checked vector of RWMimeParameter objects.
RWMimeParameterList::RWMimeParameterList | ( | void | ) |
Default constructor. Constructs an empty parameter list.
RWMimeParameterList::RWMimeParameterList | ( | const RWMimeParameterList & | second | ) |
Copy constructor. Constructs a new list as a deep copy of second.
RWMimeParameterList::~RWMimeParameterList | ( | void | ) |
Destructor.
RWCString RWMimeParameterList::asString | ( | void | ) | const |
Returns a string representation of self. Throws RWMimeError if self cannot be represented as valid MIME. The RWCString should contain 7-bit US-ASCII data.
size_t RWMimeParameterList::findParameter | ( | const RWCString & | name, |
size_t | start = 0 |
||
) | const |
void RWMimeParameterList::fromString | ( | const RWCString & | paramString | ) |
Parses paramString and populates self with the contents of paramString. Throws RWMimeParseError if the function cannot parse the contents of paramString. The RWCString should contain 7-bit US-ASCII data.
RWMimeParameter RWMimeParameterList::getParameter | ( | size_t | i | ) | const |
Returns the parameter at the specified position. Throws RWBoundsErr if i is greater than or equal to getParameterCount().
size_t RWMimeParameterList::getParameterCount | ( | void | ) | const |
Returns the total number of parameters in self.
Returns the value of the first parameter that contains a name matching name, or the empty string if no such parameter is present. Begins searching at start. Matches parameter names using a case-insensitive string comparison. The RWCString should contain 7-bit US-ASCII data.
void RWMimeParameterList::insertParameter | ( | const RWMimeParameter & | parameter | ) |
Inserts parameter at the end of self's parameter list.
RWMimeParameterList& RWMimeParameterList::operator= | ( | const RWMimeParameterList & | second | ) |
Assignment operator. Makes self a deep copy of second.
void RWMimeParameterList::removeAllParameters | ( | void | ) |
Removes all parameters from self.
void RWMimeParameterList::removeParameter | ( | size_t | position | ) |
Removes the parameter located at position from the parameter list. Throws RWBoundsErr if position is greater than or equal to getParameterCount().
void RWMimeParameterList::setParameterValue | ( | const RWCString & | name, |
const RWCString & | value, | ||
size_t | start = 0 |
||
) |
Changes the value of the first parameter that contains a name matching name to value. Begins searching at start. If no such parameter exists, creates a new parameter and inserts the new parameter into self's parameter list. Matches parameter names using a case-insensitive string comparison. The RWCString should contain 7-bit US-ASCII data.
|
friend |
Equality operator. Returns true
if first and second are equal, false
otherwise. Compares the number of parameters the objects contain, then compares each parameter in each object with the parameter of the same name in the other object. Uses a case-insensitive comparison for parameter name and a case-sensitive comparison for parameter value.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |