aitools::invertedindex::PairString< T > Class Template Reference

#include <PairString.hpp>

List of all members.

Public Types

typedef T element_type

Public Member Functions

 PairString ()
 PairString (T e1, const std::string &e2)
 PairString (const PairString< T > &pair)
virtual ~PairString ()
void clear ()
double score () const
bool operator== (const PairString< T > &pair) const
bool operator!= (const PairString< T > &pair) const
bool operator> (const PairString< T > &pair) const
bool operator< (const PairString< T > &pair) const
void parse (std::istream &is)
T & e1 ()
const T & e1 () const
std::string & e2 ()
const std::string & 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_T = sizeof(T)

Private Attributes

e1_
std::string e2_

Detailed Description

template<typename T>
class aitools::invertedindex::PairString< T >

A class template of a concrete Value. This class interprets its ByteBuffer as primitive-string-tuple. Valid primitive types defined by the template parameter T are [u]int[ 8 | 16 | 32 | 64 ]_t | float | double

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

Definition at line 26 of file PairString.hpp.


Member Typedef Documentation

template<typename T>
typedef T aitools::invertedindex::PairString< T >::element_type

Definition at line 31 of file PairString.hpp.


Constructor & Destructor Documentation

template<typename T >
aitools::invertedindex::PairString< T >::PairString (  )  [inline]

The default constructor.

Definition at line 108 of file PairString.hpp.

template<typename T >
aitools::invertedindex::PairString< T >::PairString ( e1,
const std::string &  e2 
) [inline]

The explicit constructor.

Definition at line 113 of file PairString.hpp.

template<typename T >
aitools::invertedindex::PairString< T >::PairString ( const PairString< T > &  pair  )  [inline]

The copy constructor.

Definition at line 119 of file PairString.hpp.

template<typename T >
aitools::invertedindex::PairString< T >::~PairString (  )  [inline, virtual]

The destructor.

Definition at line 125 of file PairString.hpp.


Member Function Documentation

template<typename T >
void aitools::invertedindex::PairString< T >::clear (  )  [inline, virtual]

Resets all internals to default values.

Implements aitools::invertedindex::Value.

Definition at line 130 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::e1_, and aitools::invertedindex::PairString< T >::e2_.

template<typename T >
const T & aitools::invertedindex::PairString< T >::e1 (  )  const [inline]

Definition at line 190 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::e1_.

template<typename T >
T & aitools::invertedindex::PairString< T >::e1 (  )  [inline]

Definition at line 183 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::e1_.

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

template<typename T >
const std::string & aitools::invertedindex::PairString< T >::e2 (  )  const [inline]

Definition at line 204 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::e2_.

template<typename T >
std::string & aitools::invertedindex::PairString< T >::e2 (  )  [inline]

Definition at line 197 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::e2_.

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

template<typename T >
bool aitools::invertedindex::PairString< T >::operator!= ( const PairString< T > &  pair  )  const [inline]

Definition at line 152 of file PairString.hpp.

template<typename T >
bool aitools::invertedindex::PairString< T >::operator< ( const PairString< T > &  pair  )  const [inline]

Definition at line 166 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::score().

Here is the call graph for this function:

template<typename T >
bool aitools::invertedindex::PairString< T >::operator== ( const PairString< T > &  pair  )  const [inline]
template<typename T >
bool aitools::invertedindex::PairString< T >::operator> ( const PairString< T > &  pair  )  const [inline]

Definition at line 159 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::score().

Here is the call graph for this function:

template<typename T >
void aitools::invertedindex::PairString< T >::parse ( std::istream &  is  )  [inline, virtual]
template<typename T >
void aitools::invertedindex::PairString< T >::print ( std::ostream &  os  )  const [inline, virtual]
template<typename T >
double aitools::invertedindex::PairString< T >::score (  )  const [inline, virtual]

Gets the weight of this object.

Implements aitools::invertedindex::Value.

Definition at line 138 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::e1_.

Referenced by aitools::invertedindex::PairString< T >::operator<(), and aitools::invertedindex::PairString< T >::operator>().

Here is the caller graph for this function:

template<typename T >
void aitools::invertedindex::PairString< T >::to_bytes ( ByteBuffer buffer  )  const [inline, virtual]

Serializes all elements into a byte buffer.

Implements aitools::invertedindex::Value.

Definition at line 221 of file PairString.hpp.

References aitools::invertedindex::ByteBuffer::data(), aitools::invertedindex::PairString< T >::e1_, aitools::invertedindex::PairString< T >::e2_, aitools::invertedindex::ByteBuffer::resize(), and aitools::invertedindex::PairString< T >::sizeof_T.

Referenced by BOOST_AUTO_TEST_CASE().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void aitools::invertedindex::PairString< T >::wrap ( const ByteBuffer buffer  )  [inline]

Interprets a byte buffer.

Reimplemented from aitools::invertedindex::Value.

Definition at line 240 of file PairString.hpp.

References aitools::invertedindex::PairString< T >::wrap().

Here is the call graph for this function:

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

Member Data Documentation

template<typename T>
const std::string aitools::invertedindex::PairString< T >::classname [inline, static]

Definition at line 35 of file PairString.hpp.

template<typename T>
T aitools::invertedindex::PairString< T >::e1_ [private]
template<typename T>
std::string aitools::invertedindex::PairString< T >::e2_ [private]
template<typename T>
const size_t aitools::invertedindex::PairString< T >::sizeof_T = sizeof(T) [static]

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