Hashes::Policies::ExtendedValidation< CheckingPolicyT > Struct Template Reference

A model of Validation Policy. More...

#include <ValidationPolicies.hpp>

Inheritance diagram for Hashes::Policies::ExtendedValidation< CheckingPolicyT >:

Inheritance graph
[legend]
Collaboration diagram for Hashes::Policies::ExtendedValidation< CheckingPolicyT >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef CheckingPolicyT CheckingPolicy
typedef CheckingPolicy::StoragePolicy StoragePolicy
typedef StoragePolicy::RawStorage RawStorage

Public Member Functions

 ExtendedValidation ()
 ExtendedValidation (const RawStorage &rhs)
template<template< typename > class OVP, typename OCP>
 ExtendedValidation (const OVP< OCP > &rhs)
template<typename OCP>
 ExtendedValidation (const ExtendedValidation< OCP > &rhs)
template<template< typename > class OVP, typename OCP>
ExtendedValidationoperator= (const OVP< OCP > &rhs)
template<typename OCP>
ExtendedValidationoperator= (const ExtendedValidation< OCP > &rhs)
void clear ()
 Overides clear() in order to clear the trusted flag as well.
bool validate ()
 Overides validate() in order to clear the trusted flag if validation fails.
bool signalTrusted ()
 Sets trusted flag, provided the Hash is valid. Returns the valid state of the hash.
void signalUntrusted ()
 Clears the trusted flag.
bool isTrusted () const
 Queries the trusted flag.

Private Attributes

bool m_trusted

Detailed Description

template<class CheckingPolicyT>
struct Hashes::Policies::ExtendedValidation< CheckingPolicyT >

A model of Validation Policy.

This policy is a refinement of Hashes::Policies::BasicValidation. It associates another flag "trusted" with the hash. The exact semantics of trusted is unspecified, except that:


Member Typedef Documentation

template<class CheckingPolicyT>
typedef CheckingPolicyT Hashes::Policies::ExtendedValidation< CheckingPolicyT >::CheckingPolicy

Reimplemented from Hashes::Policies::BasicValidation< CheckingPolicyT >.

template<class CheckingPolicyT>
typedef CheckingPolicy::StoragePolicy Hashes::Policies::ExtendedValidation< CheckingPolicyT >::StoragePolicy

Reimplemented from Hashes::Policies::BasicValidation< CheckingPolicyT >.

template<class CheckingPolicyT>
typedef StoragePolicy::RawStorage Hashes::Policies::ExtendedValidation< CheckingPolicyT >::RawStorage

Reimplemented from Hashes::Policies::BasicValidation< CheckingPolicyT >.


Constructor & Destructor Documentation

template<class CheckingPolicyT>
Hashes::Policies::ExtendedValidation< CheckingPolicyT >::ExtendedValidation (  )  [inline]

template<class CheckingPolicyT>
Hashes::Policies::ExtendedValidation< CheckingPolicyT >::ExtendedValidation ( const RawStorage rhs  )  [inline]

template<class CheckingPolicyT>
template<template< typename > class OVP, typename OCP>
Hashes::Policies::ExtendedValidation< CheckingPolicyT >::ExtendedValidation ( const OVP< OCP > &  rhs  )  [inline]

template<class CheckingPolicyT>
template<typename OCP>
Hashes::Policies::ExtendedValidation< CheckingPolicyT >::ExtendedValidation ( const ExtendedValidation< OCP > &  rhs  )  [inline]


Member Function Documentation

template<class CheckingPolicyT>
template<template< typename > class OVP, typename OCP>
ExtendedValidation& Hashes::Policies::ExtendedValidation< CheckingPolicyT >::operator= ( const OVP< OCP > &  rhs  )  [inline]

Reimplemented from Hashes::Policies::BasicValidation< CheckingPolicyT >.

template<class CheckingPolicyT>
template<typename OCP>
ExtendedValidation& Hashes::Policies::ExtendedValidation< CheckingPolicyT >::operator= ( const ExtendedValidation< OCP > &  rhs  )  [inline]

template<class CheckingPolicyT>
void Hashes::Policies::ExtendedValidation< CheckingPolicyT >::clear (  )  [inline]

Overides clear() in order to clear the trusted flag as well.

Reimplemented from Hashes::Policies::BasicValidation< CheckingPolicyT >.

template<class CheckingPolicyT>
bool Hashes::Policies::ExtendedValidation< CheckingPolicyT >::validate (  )  [inline]

Overides validate() in order to clear the trusted flag if validation fails.

Reimplemented from Hashes::Policies::BasicValidation< CheckingPolicyT >.

template<class CheckingPolicyT>
bool Hashes::Policies::ExtendedValidation< CheckingPolicyT >::signalTrusted (  )  [inline]

Sets trusted flag, provided the Hash is valid. Returns the valid state of the hash.

template<class CheckingPolicyT>
void Hashes::Policies::ExtendedValidation< CheckingPolicyT >::signalUntrusted (  )  [inline]

Clears the trusted flag.

template<class CheckingPolicyT>
bool Hashes::Policies::ExtendedValidation< CheckingPolicyT >::isTrusted (  )  const [inline]

Queries the trusted flag.


Member Data Documentation

template<class CheckingPolicyT>
bool Hashes::Policies::ExtendedValidation< CheckingPolicyT >::m_trusted [private]


The documentation for this struct was generated from the following file:
Generated on Wed Aug 8 03:46:48 2007 for Shareaza by  doxygen 1.5.2