Module: Internet Protocols Module Package: MIME
Does not inherit
#include <rw/mime/RWMimeParameterList.h>
RWMimeParameterList contains a bounds-checked vector of RWMimeParameter objects.
RWMimeParameterList(void);
Default constructor. Constructs an empty parameter list.
RWMimeParameterList(const RWMimeParameterList& second);
Constructs a new list as a deep copy of second.
~RWMimeParameterList(void);
Destructor.
RWMimeParameterList& operator=(const RWMimeParameterList& second);
Assignment operator. Makes self a deep copy of second.
bool operator==(const RWMimeParameterList& first, const RWMimeParameterList& second);
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.
RWCstring 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 findParameter(const RWCString& name, size_t start = 0) const;
Returns the index of the first parameter in the collection with a name matching name, or RW_NPOS if no parameter with that name is present. Begins searching at start. Uses a case-insensitive comparison to match name. The RWCString should contain 7-bit US-ASCII data.
void 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 getParameter(size_t i) const;
Returns the parameter at the specified position. Throws RWBoundsErr if i is less than 0 or greater than getParameterCount() - 1.
size_t getParameterCount(void) const;
Returns the total number of parameters in self.
RWCString getParameterValue(const RWCString& name, size_t start = 0) const;
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 insertParameter(const RWMimeParameter& parameter);
Inserts parameter at the end of self's parameter list.
void removeAllParameters(void);
Removes all parameters from self.
void removeParameter(size_t position);
Removes the parameter located at position from the parameter list. Throws RWBoundsErr if position is less than zero or greater than getParameterCount() - 1.
void 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.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.