Panda3D
Public Member Functions | List of all members
HTTPEntityTag Class Reference

A container for an "entity tag" from an HTTP server. More...

Public Member Functions

 __init__ ()
 
 __init__ (const HTTPEntityTag copy)
 
 __init__ (bool weak, str tag)
 This constructor accepts an explicit weak flag and a literal (not quoted) tag string. More...
 
 __init__ (str text)
 This constructor accepts a string as formatted from an HTTP server (e.g. More...
 
int compareTo (const HTTPEntityTag other)
 Returns a number less than zero if this HTTPEntityTag sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent. More...
 
str getString ()
 Returns the entity tag formatted for sending to an HTTP server (the tag is quoted, with a conditional W prefix). More...
 
str getTag ()
 Returns the tag as a literal string. More...
 
bool isWeak ()
 Returns true if the entity tag is marked as "weak". More...
 
bool operator != (const HTTPEntityTag other)
 
bool operator< (const HTTPEntityTag other)
 
HTTPEntityTag operator= (const HTTPEntityTag copy)
 
bool operator== (const HTTPEntityTag other)
 
 output (Ostream out)
 
bool strongEquiv (const HTTPEntityTag other)
 Returns true if the two tags have "strong" equivalence: they are the same tag, and both are "strong". More...
 
bool weakEquiv (const HTTPEntityTag other)
 Returns true if the two tags have "weak" equivalence: they are the same tag, and one or both may be "weak". More...
 

Detailed Description

A container for an "entity tag" from an HTTP server.

This is used to identify a particular version of a document or resource, particularly useful for verifying caches.

Member Function Documentation

◆ __init__() [1/4]

__init__ ( )

◆ __init__() [2/4]

__init__ ( const HTTPEntityTag  copy)

◆ __init__() [3/4]

__init__ ( bool  weak,
str  tag 
)

This constructor accepts an explicit weak flag and a literal (not quoted) tag string.

◆ __init__() [4/4]

__init__ ( str  text)

This constructor accepts a string as formatted from an HTTP server (e.g.

the tag is quoted, with an optional W/ prefix.)

◆ compareTo()

int compareTo ( const HTTPEntityTag  other)

Returns a number less than zero if this HTTPEntityTag sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.

◆ getString()

str getString ( )

Returns the entity tag formatted for sending to an HTTP server (the tag is quoted, with a conditional W prefix).

◆ getTag()

str getTag ( )

Returns the tag as a literal string.

◆ isWeak()

bool isWeak ( )

Returns true if the entity tag is marked as "weak".

A consistent weak entity tag does not guarantee that its resource has not changed in any way, but it does promise that the resource has not changed in any semantically meaningful way.

◆ operator !=()

bool operator != ( const HTTPEntityTag  other)

◆ operator<()

bool operator< ( const HTTPEntityTag  other)

◆ operator=()

HTTPEntityTag operator= ( const HTTPEntityTag  copy)

◆ operator==()

bool operator== ( const HTTPEntityTag  other)

◆ output()

output ( Ostream  out)

◆ strongEquiv()

bool strongEquiv ( const HTTPEntityTag  other)

Returns true if the two tags have "strong" equivalence: they are the same tag, and both are "strong".

◆ weakEquiv()

bool weakEquiv ( const HTTPEntityTag  other)

Returns true if the two tags have "weak" equivalence: they are the same tag, and one or both may be "weak".