restcgi::version_constraint Class Reference

List of all members.

Detailed Description

Constraint on a resource's version which governs the operation of or response to a method.

A method request may contain a constraint on the version of the resource to which it applies. There are 2 kinds of constraints: the resource's version must be identical to the constraint's (the resource is unmodified) or the resource must have a different version than the constraint's (the resource has been modified).

See also:
version, copy(const request_hdr& rh, version_constraint& vc)

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26


Public Types

typedef restcgi::version version_type
 version type

Public Member Functions

 version_constraint ()
 Construct.
 version_constraint (const version_type &v, bool mod)
 Construct.
bool is_null () const
 Test if null.
const version_typeversion () const
 Get version.
bool modified () const
void assert_satisfied (const version_type &v, const method_e &e) const


Member Function Documentation

void restcgi::version_constraint::assert_satisfied ( const version_type v,
const method_e e 
) const

Assert that the given version satisfies the constraint. This will check the version tags (if any) first then the expiration dates (if any). See class description.

Exceptions:
precondition_failed unmodified constraint not met or modified tag constraint not met
not_modified modified date-time constraint not met

bool restcgi::version_constraint::modified (  )  const [inline]

Get whether constrained to be modified.


Generated on Fri May 15 11:27:12 2009 for restcgi by  doxygen 1.4.7