SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWHttpDateHeader Class Reference

Helper class that defines an HTTP Date header. More...

#include <rw/http/RWHttpDateHeader.h>

Inheritance diagram for RWHttpDateHeader:
RWHttpHeaderBase RWHttpIfDateRangeHeader RWHttpIfModifiedSinceHeader

Public Member Functions

 RWHttpDateHeader (void)
 
 RWHttpDateHeader (const RWCString &label, RWHttpHeaderType type=RW_HTTP_ENTITY_HEADER)
 
 RWHttpDateHeader (const RWHttpDate &d)
 
 RWHttpDateHeader (const RWCString &label, const RWHttpDate &d, RWHttpHeaderType type=RW_HTTP_ENTITY_HEADER)
 
 RWHttpDateHeader (const RWHttpGenericHeader &hdr)
 
RWHttpDate getDate (void) const
 
virtual RWCString getValue (void) const
 
void setDate (const RWHttpDate &d)
 
- Public Member Functions inherited from RWHttpHeaderBase
virtual bool append (const RWCString &str)
 
virtual RWCString asString (void) const
 
RWCString getLabel (void) const
 
RWHttpHeaderType getType () const
 
bool operator!= (const RWHttpHeaderBase &) const
 
bool operator< (const RWHttpHeaderBase &hdr) const
 
bool operator== (const RWHttpHeaderBase &h) const
 

Additional Inherited Members

- Static Public Member Functions inherited from RWHttpHeaderBase
static unsigned hash (const RWHttpHeaderBase &)
 
- Protected Member Functions inherited from RWHttpHeaderBase
 RWHttpHeaderBase (void)
 
 RWHttpHeaderBase (const RWCString &label, RWHttpHeaderType type=RW_HTTP_ENTITY_HEADER)
 

Detailed Description

RWHttpDateHeader is a specialization class of RWHttpHeaderBase that defines the HTTP Date header. It is a helper class that formats its contents as Date: header_value, where header_value is information on date and time.

Constructor & Destructor Documentation

RWHttpDateHeader::RWHttpDateHeader ( void  )
inline

Constructs a default RWHttpDateHeader object with the associated value of the Date label as the current date and time.

RWHttpDateHeader::RWHttpDateHeader ( const RWCString label,
RWHttpHeaderType  type = RW_HTTP_ENTITY_HEADER 
)
inline

Constructs an RWHttpDateHeader object with the label of the header equal to label, and its associated value equal to the current date and time. The label is a specific type of the Date header, such as the If-Modified-Since header. The RWCString should contain 7-bit US-ASCII data.

RWHttpDateHeader::RWHttpDateHeader ( const RWHttpDate d)
inline

Constructs an RWHttpDateHeader object with the value equal to d.

RWHttpDateHeader::RWHttpDateHeader ( const RWCString label,
const RWHttpDate d,
RWHttpHeaderType  type = RW_HTTP_ENTITY_HEADER 
)
inline

Constructs an RWHttpDateHeader object with the label of the header equal to label, and its associated value equal to d. The label is the specific type of the Date header, such as the If-Modified-Since header. The RWCString should contain 7-bit US-ASCII data.

RWHttpDateHeader::RWHttpDateHeader ( const RWHttpGenericHeader hdr)

Constructs an RWHttpDateHeader object from an RWHttpGenericHeader that represents a Date HTTP header. If the RWHttpGenericHeader does not represent a Date HTTP header or if the value of the RWHttpGenericHeader does not conform to the formatting of a Date value, an RWHttpHeaderParseError exception is thrown.

Member Function Documentation

RWHttpDate RWHttpDateHeader::getDate ( void  ) const
inline

Returns the internal value of the header.

virtual RWCString RWHttpDateHeader::getValue ( void  ) const
virtual

Returns the internal value that is associated with the label of the header in an RWCString format. The RWCString should contain 7-bit US-ASCII data. Throws RWInternalErr if RWHttpDate::isValid() returns false.

Implements RWHttpHeaderBase.

void RWHttpDateHeader::setDate ( const RWHttpDate d)
inline

Assigns d to the internal value.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.