oln::utils::key Class Reference

16 bytes key More...

#include <key.hh>

Collaboration diagram for oln::utils::key:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ntg::int_u8 value_type
 Used data type.

Public Member Functions

 key (const std::vector< value_type > &data)
 Constructor used to initialize the key.
 key (const value_type *data)
 Constructor used to initialize the key.
value_typeoperator[] (unsigned i)
 [] operator.
const value_typeoperator[] (unsigned i) const
 [] operator.
bool operator== (const key &k)
 Check equality between two keys.
bool operator!= (const key &k)
 Check whether two key are different.

Protected Attributes

value_type data_ [16]
 Internal data.

Friends

std::ostream & operator<< (std::ostream &stream, const key &k)
 Write of representation of the key on a stream.

Detailed Description

16 bytes key

Object to have a nice representation of a MD5 result.

Definition at line 41 of file key.hh.


Constructor & Destructor Documentation

oln::utils::key::key ( const std::vector< value_type > &  data  )  [inline, explicit]

Constructor used to initialize the key.

Precondition:
There must at least 16 elements in data.
  • data Inuput data.

Definition at line 150 of file key.hh.

oln::utils::key::key ( const value_type data  )  [inline, explicit]

Constructor used to initialize the key.

Precondition:
There must at least 16 elements in data.
  • data Inuput data.

Definition at line 158 of file key.hh.


Member Function Documentation

key::value_type & oln::utils::key::operator[] ( unsigned  i  )  [inline]

[] operator.

Returns:
the ith byte of the key.
This is the non const version of the operator.

Definition at line 166 of file key.hh.

const key::value_type & oln::utils::key::operator[] ( unsigned  i  )  const [inline]

[] operator.

Returns:
the ith byte of the key.
This is the const version of the operator.

Definition at line 174 of file key.hh.

bool oln::utils::key::operator== ( const key k  )  [inline]

Check equality between two keys.

Definition at line 182 of file key.hh.

bool oln::utils::key::operator!= ( const key k  )  [inline]

Check whether two key are different.

Definition at line 192 of file key.hh.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const key k 
) [friend]

Write of representation of the key on a stream.

stream Stream to put the key on. k Key to represent.

Definition at line 104 of file key.hh.

00105       {
00106         stream << "{";
00107         for (unsigned i = 0; i < 15; ++i)
00108           stream << "0x" << std::hex << k[i] << ", ";
00109         stream << "0x" << std::hex << k[15] << "}";
00110         return stream;
00111       }


The documentation for this class was generated from the following file:
Generated on Tue Feb 20 20:30:02 2007 for Olena by  doxygen 1.5.1