ContentLanguageList Class Reference
#include <ContentLanguageList.h>
Public Member Functions
ContentLanguageList () ContentLanguageList (const ContentLanguageList &contentLanguages) ~ContentLanguageList () ContentLanguageList & operator= (const ContentLanguageList &contentLanguages) Uint32 size () const LanguageTag getLanguageTag (Uint32 index) const void append (const LanguageTag &languageTag) void remove (Uint32 index) Uint32 find (const LanguageTag &languageTag) const void clear () Boolean operator== (const ContentLanguageList &contentLanguages) const Boolean operator!= (const ContentLanguageList &contentLanguages) const Detailed Description
This class represents a list of content languages (such as may appear in an HTTP Content-Language header value). It is managed as a list of LanguageTag objects.
Constructor & Destructor Documentation
ContentLanguageList::ContentLanguageList ( ) Constructs an empty ContentLanguageList object.
ContentLanguageList::ContentLanguageList ( const ContentLanguageList & contentLanguages ) Copy constructor.
- Parameters:
contentLanguages The ContentLanguageList object to copy.
ContentLanguageList::~ContentLanguageList ( ) Destructor.
Member Function Documentation
void ContentLanguageList::append ( const LanguageTag & languageTag ) Appends a LanguageTag to the ContentLanguageList object.
- Parameters:
languageTag The LanguageTag to append.
void ContentLanguageList::clear ( ) Removes all the LanguageTags from the ContentLanguageList object.
Uint32 ContentLanguageList::find ( const LanguageTag & languageTag ) const Finds the specified LanguageTag in the ContentLanguageList object and returns its index.
- Parameters:
languageTag The LanguageTag to find.
- Returns:
- Integer index of the LanguageTag, if found; otherwise PEG_NOT_FOUND.
LanguageTag ContentLanguageList::getLanguageTag ( Uint32 index ) const Accesses a LanguageTag at a specified index.
- Parameters:
index Integer index of the LanguageTag to access. Valid indices range from 0 to size()-1.
- Returns:
- The LanguageTag corresponding to the specified index.
- Exceptions:
IndexOutOfBoundsException If the specified index is out of range.
Boolean ContentLanguageList::operator!= ( const ContentLanguageList & contentLanguages ) const Tests ContentLanguageList objects for inequality.
- Parameters:
contentLanguages A ContentLanguageList object to be compared.
- Returns:
- False if the ContentLanguageList objects contain the same LanguageTags in the same order, true otherwise.
ContentLanguageList& ContentLanguageList::operator= ( const ContentLanguageList & contentLanguages ) Assignment operator.
- Parameters:
contentLanguages The ContentLanguageList object to copy.
Boolean ContentLanguageList::operator== ( const ContentLanguageList & contentLanguages ) const Tests ContentLanguageList objects for equality.
- Parameters:
contentLanguages A ContentLanguageList object to be compared.
- Returns:
- True if the ContentLanguageList objects contain the same LanguageTags in the same order, false otherwise.
void ContentLanguageList::remove ( Uint32 index ) Removes the specified LanguageTag from the ContentLanguageList object.
- Parameters:
index Integer index of the LanguageTag to remove.
- Exceptions:
IndexOutOfBoundsException If the specified index is out of range.
Uint32 ContentLanguageList::size ( ) const Returns the number of LanguageTags in the ContentLanguageList object.
- Returns:
- Integer size of the ContentLanguageList list.
The documentation for this class was generated from the following file:
- /var/tmp/axbld-26152/rpm/BUILD/pegasus/src/Pegasus/Common/ContentLanguageList.h