aitools::invertedindex::Pair< T1, T2 > Class Template Reference

#include <Pair.hpp>

List of all members.

Public Types

typedef T1 e1_type
typedef T2 e2_type

Public Member Functions

 Pair ()
 Pair (T1 e1, T2 e2)
 Pair (const Pair< T1, T2 > &pair)
virtual ~Pair ()
void clear ()
double score () const
bool operator== (const Pair< T1, T2 > &pair) const
bool operator!= (const Pair< T1, T2 > &pair) const
bool operator> (const Pair< T1, T2 > &pair) const
bool operator< (const Pair< T1, T2 > &pair) const
void parse (std::istream &is)
T1 & e1 ()
T2 & e2 ()
const T1 & e1 () const
const T2 & e2 () const
void print (std::ostream &os) const
void to_bytes (ByteBuffer &buffer) const
void wrap (const char *data, size_t size)
void wrap (const ByteBuffer &buffer)

Static Public Attributes

static const std::string classname
static const size_t sizeof_T1 = sizeof(T1)
static const size_t sizeof_T2 = sizeof(T2)
static const size_t sizeof_value = sizeof_T1 + sizeof_T2

Private Attributes

T1 e1_
T2 e2_

Detailed Description

template<typename T1, typename T2>
class aitools::invertedindex::Pair< T1, T2 >

A class template of a concrete Value. This class interprets its ByteBuffer as two primitive values. Valid primitive types defined by the template parameters T1 and T2 are [u]int[ 8 | 16 | 32 | 64 ]_t | float | double

Author:
martin.trenkmann@uni-weimar.de
Version:
Id
Pair.hpp,v 1.1 2010/10/15 17:44:46 trenkman Exp

Definition at line 20 of file Pair.hpp.


Member Typedef Documentation

template<typename T1, typename T2>
typedef T1 aitools::invertedindex::Pair< T1, T2 >::e1_type

Definition at line 12 of file Pair.hpp.

template<typename T1, typename T2>
typedef T2 aitools::invertedindex::Pair< T1, T2 >::e2_type

Definition at line 13 of file Pair.hpp.


Constructor & Destructor Documentation

template<typename T1 , typename T2 >
aitools::invertedindex::Pair< T1, T2 >::Pair (  )  [inline]

The default constructor.

Definition at line 118 of file Pair.hpp.

template<typename T1 , typename T2 >
aitools::invertedindex::Pair< T1, T2 >::Pair ( T1  e1,
T2  e2 
) [inline]

The explicit constructor.

Definition at line 124 of file Pair.hpp.

template<typename T1 , typename T2 >
aitools::invertedindex::Pair< T1, T2 >::Pair ( const Pair< T1, T2 > &  pair  )  [inline]

The copy constructor.

Definition at line 130 of file Pair.hpp.

template<typename T1 , typename T2 >
aitools::invertedindex::Pair< T1, T2 >::~Pair (  )  [inline, virtual]

The destructor.

Definition at line 136 of file Pair.hpp.


Member Function Documentation

template<typename T1 , typename T2 >
void aitools::invertedindex::Pair< T1, T2 >::clear (  )  [inline, virtual]

Resets all internals to default values.

Implements aitools::invertedindex::Value.

Definition at line 141 of file Pair.hpp.

template<typename T1 , typename T2 >
const T1 & aitools::invertedindex::Pair< T1, T2 >::e1 (  )  const [inline]

Access the 1st element for reading.

Definition at line 210 of file Pair.hpp.

template<typename T1 , typename T2 >
T1 & aitools::invertedindex::Pair< T1, T2 >::e1 (  )  [inline]

Access the 1st element for writing.

Definition at line 196 of file Pair.hpp.

template<typename T1 , typename T2 >
const T2 & aitools::invertedindex::Pair< T1, T2 >::e2 (  )  const [inline]

Access the 2nd element for reading.

Definition at line 217 of file Pair.hpp.

template<typename T1 , typename T2 >
T2 & aitools::invertedindex::Pair< T1, T2 >::e2 (  )  [inline]

Access the 2nd element for writing.

Definition at line 203 of file Pair.hpp.

template<typename T1 , typename T2 >
bool aitools::invertedindex::Pair< T1, T2 >::operator!= ( const Pair< T1, T2 > &  pair  )  const [inline]

Definition at line 163 of file Pair.hpp.

template<typename T1 , typename T2 >
bool aitools::invertedindex::Pair< T1, T2 >::operator< ( const Pair< T1, T2 > &  pair  )  const [inline]

Definition at line 177 of file Pair.hpp.

template<typename T1 , typename T2 >
bool aitools::invertedindex::Pair< T1, T2 >::operator== ( const Pair< T1, T2 > &  pair  )  const [inline]

Definition at line 156 of file Pair.hpp.

template<typename T1 , typename T2 >
bool aitools::invertedindex::Pair< T1, T2 >::operator> ( const Pair< T1, T2 > &  pair  )  const [inline]

Definition at line 170 of file Pair.hpp.

template<typename T1 , typename T2 >
void aitools::invertedindex::Pair< T1, T2 >::parse ( std::istream &  is  )  [inline, virtual]

Parses all elements from an input stream.

Implements aitools::invertedindex::Value.

Definition at line 184 of file Pair.hpp.

template<typename T1 , typename T2 >
void aitools::invertedindex::Pair< T1, T2 >::print ( std::ostream &  os  )  const [inline, virtual]

Prints all elements to an output stream.

Implements aitools::invertedindex::Value.

Definition at line 224 of file Pair.hpp.

template<typename T1 , typename T2 >
double aitools::invertedindex::Pair< T1, T2 >::score (  )  const [inline, virtual]

Gets the weight of this object.

Implements aitools::invertedindex::Value.

Definition at line 149 of file Pair.hpp.

template<typename T1 , typename T2 >
void aitools::invertedindex::Pair< T1, T2 >::to_bytes ( ByteBuffer buffer  )  const [inline, virtual]

Serializes all elements into a byte buffer.

Implements aitools::invertedindex::Value.

Definition at line 237 of file Pair.hpp.

template<typename T1 , typename T2 >
void aitools::invertedindex::Pair< T1, T2 >::wrap ( const ByteBuffer buffer  )  [inline]

Interprets a byte buffer.

Reimplemented from aitools::invertedindex::Value.

Definition at line 256 of file Pair.hpp.

template<typename T1 , typename T2 >
void aitools::invertedindex::Pair< T1, T2 >::wrap ( const char *  data,
size_t  size 
) [inline, virtual]

Interprets a byte buffer.

Implements aitools::invertedindex::Value.

Definition at line 246 of file Pair.hpp.


Member Data Documentation

template<typename T1, typename T2>
const std::string aitools::invertedindex::Pair< T1, T2 >::classname [inline, static]

Definition at line 17 of file Pair.hpp.

template<typename T1, typename T2>
T1 aitools::invertedindex::Pair< T1, T2 >::e1_ [private]

Definition at line 92 of file Pair.hpp.

template<typename T1, typename T2>
T2 aitools::invertedindex::Pair< T1, T2 >::e2_ [private]

Definition at line 93 of file Pair.hpp.

template<typename T1, typename T2>
const size_t aitools::invertedindex::Pair< T1, T2 >::sizeof_T1 = sizeof(T1) [static]

Definition at line 19 of file Pair.hpp.

template<typename T1, typename T2>
const size_t aitools::invertedindex::Pair< T1, T2 >::sizeof_T2 = sizeof(T2) [static]

Definition at line 20 of file Pair.hpp.

template<typename T1, typename T2>
const size_t aitools::invertedindex::Pair< T1, T2 >::sizeof_value = sizeof_T1 + sizeof_T2 [static]

Definition at line 22 of file Pair.hpp.


The documentation for this class was generated from the following file:
Generated on Wed May 30 15:07:38 2012 by  doxygen 1.6.3