rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWMimeParameterList Class Reference
[MIME]

Contains a bounds-checked vector of RWMimeParameter objects. More...

#include <rw/mime/RWMimeParameterList.h>

List of all members.

Public Member Functions

 RWMimeParameterList (void)
 RWMimeParameterList (const RWMimeParameterList &second)
RWMimeParameterListoperator= (const RWMimeParameterList &second)
 ~RWMimeParameterList (void)
size_t getParameterCount (void) const
RWMimeParameter getParameter (size_t i) const
RWCString getParameterValue (const RWCString &name, size_t start=0) const
void setParameterValue (const RWCString &name, const RWCString &value, size_t start=0)
void insertParameter (const RWMimeParameter &parameter)
void removeParameter (size_t position)
size_t findParameter (const RWCString &name, size_t start=0) const
void removeAllParameters (void)
RWCString asString (void) const
void fromString (const RWCString &paramString)

Friends

bool operator== (const RWMimeParameterList &first, const RWMimeParameterList &second)

Detailed Description

RWMimeParameterList contains a bounds-checked vector of RWMimeParameter objects.


Constructor & Destructor Documentation

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.


Member Function Documentation

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

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 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.

RWCString RWMimeParameterList::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 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.


Friends And Related Function Documentation

bool operator== ( const RWMimeParameterList first,
const RWMimeParameterList second 
) [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.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.