CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

edm::Hash< I > Class Template Reference

#include <Hash.h>

List of all members.

Public Types

typedef hash_detail::value_type value_type

Public Member Functions

value_type compactForm () const
 Hash (value_type const &v)
 Hash ()
 Hash (Hash< I > const &)
bool isCompactForm () const
bool isValid () const
bool operator!= (Hash< I > const &other) const
bool operator< (Hash< I > const &other) const
Hash< I > & operator= (Hash< I > const &iRHS)
bool operator== (Hash< I > const &other) const
bool operator> (Hash< I > const &other) const
std::ostream & print (std::ostream &os) const
void reset ()
void swap (Hash< I > &other)
void toDigest (cms::Digest &digest) const
void toString (std::string &result) const

Static Public Member Functions

static short Class_Version ()

Private Member Functions

template<typename Op >
bool compareUsing (Hash< I > const &iOther, Op op) const
void throwIfIllFormed () const

Private Attributes

value_type hash_

Detailed Description

template<int I>
class edm::Hash< I >

Definition at line 41 of file Hash.h.


Member Typedef Documentation

template<int I>
typedef hash_detail::value_type edm::Hash< I >::value_type

Definition at line 43 of file Hash.h.


Constructor & Destructor Documentation

template<int I>
edm::Hash< I >::Hash ( ) [inline]

Definition at line 113 of file Hash.h.

template<int I>
edm::Hash< I >::Hash ( value_type const &  v) [explicit]
template<int I>
edm::Hash< I >::Hash ( Hash< I > const &  iOther) [inline]

Definition at line 123 of file Hash.h.

References edm::hash_detail::fixup_(), and edm::Hash< I >::hash_.

                                     : hash_(iOther.hash_) {
     hash_detail::fixup_(hash_);
  }

Member Function Documentation

template<int I>
static short edm::Hash< I >::Class_Version ( ) [inline, static]

Definition at line 76 of file Hash.h.

{return 10;}
template<int I>
Hash< I >::value_type edm::Hash< I >::compactForm ( ) const [inline]
template<int I>
template<typename Op >
bool edm::Hash< I >::compareUsing ( Hash< I > const &  iOther,
Op  op 
) const [inline, private]

Definition at line 86 of file Hash.h.

                                                       {
        bool meCF = hash_detail::isCompactForm_(hash_);
        bool otherCF = hash_detail::isCompactForm_(iOther.hash_);
        if(meCF == otherCF) {
          return op(this->hash_,iOther.hash_);
        }
        //copy constructor will do compact form conversion
        if(meCF) {
           Hash<I> temp(iOther);
           return op(this->hash_,temp.hash_);
        } 
        Hash<I> temp(*this);
        return op(temp.hash_,iOther.hash_);
      }
template<int I>
bool edm::Hash< I >::isCompactForm ( ) const [inline]

Definition at line 218 of file Hash.h.

References edm::hash_detail::isCompactForm_().

template<int I>
bool edm::Hash< I >::isValid ( void  ) const [inline]
template<int I>
bool edm::Hash< I >::operator!= ( Hash< I > const &  other) const [inline]

Definition at line 174 of file Hash.h.

                                                {
    return this->compareUsing(other, std::not_equal_to<std::string>());
  }
template<int I>
bool edm::Hash< I >::operator< ( Hash< I > const &  other) const [inline]

Definition at line 153 of file Hash.h.

                                               {
    return this->compareUsing(other, std::less<std::string>());
  }
template<int I>
Hash< I > & edm::Hash< I >::operator= ( Hash< I > const &  iRHS) [inline]

Definition at line 130 of file Hash.h.

References edm::hash_detail::fixup_(), and edm::Hash< I >::hash_.

                                        {
    hash_ = iRHS.hash_;
    hash_detail::fixup_(hash_);
    return *this;
  }
template<int I>
bool edm::Hash< I >::operator== ( Hash< I > const &  other) const [inline]

Definition at line 167 of file Hash.h.

                                                {
    return this->compareUsing(other, std::equal_to<std::string>());
  }
template<int I>
bool edm::Hash< I >::operator> ( Hash< I > const &  other) const [inline]

Definition at line 160 of file Hash.h.

                                               {
    return this->compareUsing(other, std::greater<std::string>());
  }
template<int I>
std::ostream & edm::Hash< I >::print ( std::ostream &  os) const [inline]

Definition at line 181 of file Hash.h.

References edm::hash_detail::print_().

                                     {
    return hash_detail::print_(os, hash_);
  }
template<int I>
void edm::Hash< I >::reset ( void  ) [inline]
template<int I>
void edm::Hash< I >::swap ( Hash< I > &  other) [inline]
template<int I>
void edm::Hash< I >::throwIfIllFormed ( ) const [private]

Hexified version of data *must* contain a multiple of 2 bytes. If it does not, throw an exception.

template<int I>
void edm::Hash< I >::toDigest ( cms::Digest digest) const [inline]

Definition at line 195 of file Hash.h.

References edm::hash_detail::toDigest_().

Referenced by edm::ParameterSetEntry::toDigest().

template<int I>
void edm::Hash< I >::toString ( std::string &  result) const [inline]

Member Data Documentation

template<int I>
value_type edm::Hash< I >::hash_ [private]