rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWHttpHeaderBase Class Reference
[HTTP]

Abstract base class from which all HTTP header classes derive. More...

#include <rw/http/RWHttpHeaderBase.h>

Inheritance diagram for RWHttpHeaderBase:
RWHttpAuthorizationHeaderBase RWHttpContentLengthHeader RWHttpContentTypeHeader RWHttpDateHeader RWHttpEntityTagHeaderBase RWHttpGenericHeader RWHttpHostHeader RWHttpRangeHeader

List of all members.

Public Member Functions

bool operator== (const RWHttpHeaderBase &h) const
bool operator!= (const RWHttpHeaderBase &) const
bool operator< (const RWHttpHeaderBase &hdr) const
RWCString getLabel (void) const
virtual RWCString asString (void) const
virtual bool append (const RWCString &str)
virtual RWCString getValue (void) const =0
RWHttpHeaderType getType () const

Static Public Member Functions

static unsigned hash (const RWHttpHeaderBase &)

Protected Member Functions

 RWHttpHeaderBase (void)
 RWHttpHeaderBase (const RWCString &label, RWHttpHeaderType type=RW_HTTP_ENTITY_HEADER)

Detailed Description

RWHttpHeaderBase is an abstract base class for all concrete RWHttpHeader classes. These classes are helpers that ease header attachment and formatting to various HTTP requests.


Constructor & Destructor Documentation

RWHttpHeaderBase::RWHttpHeaderBase ( void   )  [inline, protected]

Constructs a default RWHttpHeaderBase as part of a specific HTTP header object. The label of the header is set to an empty string, and the header type is set to RW_HTTP_ENTITY_HEADER.

RWHttpHeaderBase::RWHttpHeaderBase ( const RWCString label,
RWHttpHeaderType  type = RW_HTTP_ENTITY_HEADER 
) [inline, protected]

Constructs an RWHttpHeaderBase as part of a specific HTTP header object. The label of the header is set to label, and the header type is set to type. The RWCString should contain 7-bit US-ASCII data.


Member Function Documentation

virtual bool RWHttpHeaderBase::append ( const RWCString str  )  [virtual]

Attempts to append str to the header as a new set of values, if the header supports appending of headers. Append returns true if it is successful in appending the headers. Otherwise it returns false. This function also returns false if it is not overridden in a derived class. The RWCString should contain 7-bit US-ASCII data.

virtual RWCString RWHttpHeaderBase::asString ( void   )  const [virtual]

Concatenates the label and the value of the header into the format label: value and returns the result as an RWCString. The RWCString should contain 7-bit US-ASCII data.

RWCString RWHttpHeaderBase::getLabel ( void   )  const [inline]

Returns the internal label of the header. The RWCString should contain 7-bit US-ASCII data.

RWHttpHeaderType RWHttpHeaderBase::getType ( void   )  const [inline]

Returns the internal type of the header.

RWCString RWHttpHeaderBase::getValue ( void   )  const [inline, pure virtual]

Returns the value associated with the label of the header. This is a pure virtual function, so it must be overridden by a derived class. The RWCString should contain 7-bit US-ASCII data.

Implemented in RWHttpBasicAuthorizationHeader, RWHttpContentLengthHeader, RWHttpContentTypeHeader, RWHttpDateHeader, RWHttpEntityTagHeaderBase, RWHttpGenericHeader, RWHttpHostHeader, and RWHttpRangeHeader.

unsigned RWHttpHeaderBase::hash ( const RWHttpHeaderBase h  )  [inline, static]

Returns the hash value of h.

bool RWHttpHeaderBase::operator!= ( const RWHttpHeaderBase h  )  const [inline]

Returns true if the RWHttpHeaderBases are not equivalent.

bool RWHttpHeaderBase::operator< ( const RWHttpHeaderBase hdr  )  const

Returns true if hdr is less than self. Otherwise returns false.

bool RWHttpHeaderBase::operator== ( const RWHttpHeaderBase h  )  const [inline]

Returns true if h is equal to self.

 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.