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

#include <Single.hpp>

List of all members.

Public Types

typedef T element_type

Public Member Functions

 Single ()
 Single (T element)
 Single (const Single< T > &single)
virtual ~Single ()
void clear ()
double score () const
bool operator== (const Single< T > &single) const
bool operator!= (const Single< T > &single) const
bool operator> (const Single< T > &single) const
bool operator< (const Single< T > &single) const
void parse (std::istream &is)
T & element ()
const T & element () 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

element_

Detailed Description

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

A class template of a concrete Value. This class interprets a ByteBuffer as one primitive value. 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
Single.hpp,v 1.1 2010/10/15 17:44:47 trenkman Exp

Definition at line 25 of file Single.hpp.


Member Typedef Documentation

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

Definition at line 30 of file Single.hpp.


Constructor & Destructor Documentation

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

The default constructor.

Definition at line 103 of file Single.hpp.

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

The explicit constructor.

Definition at line 108 of file Single.hpp.

template<typename T >
aitools::invertedindex::Single< T >::Single ( const Single< T > &  single  )  [inline]

The copy constructor.

Definition at line 113 of file Single.hpp.

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

The destructor.

Definition at line 118 of file Single.hpp.


Member Function Documentation

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

Resets all internals to default values.

Implements aitools::invertedindex::Value.

Definition at line 123 of file Single.hpp.

References aitools::invertedindex::Single< T >::element_.

template<typename T >
const T & aitools::invertedindex::Single< T >::element (  )  const [inline]

Definition at line 181 of file Single.hpp.

References aitools::invertedindex::Single< T >::element_.

template<typename T >
T & aitools::invertedindex::Single< T >::element (  )  [inline]

Definition at line 174 of file Single.hpp.

References aitools::invertedindex::Single< T >::element_.

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

Definition at line 144 of file Single.hpp.

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

Definition at line 158 of file Single.hpp.

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

Here is the call graph for this function:

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

Definition at line 137 of file Single.hpp.

References aitools::invertedindex::Single< T >::element_.

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

Definition at line 151 of file Single.hpp.

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

Here is the call graph for this function:

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

Gets the weight of this object.

Implements aitools::invertedindex::Value.

Definition at line 130 of file Single.hpp.

References aitools::invertedindex::Single< T >::element_.

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

Here is the caller graph for this function:

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

Serializes all elements into a byte buffer.

Implements aitools::invertedindex::Value.

Definition at line 197 of file Single.hpp.

References aitools::invertedindex::ByteBuffer::data(), aitools::invertedindex::Single< T >::element_, aitools::invertedindex::ByteBuffer::resize(), and aitools::invertedindex::Single< T >::sizeof_T.

Here is the call graph for this function:

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

Interprets a byte buffer.

Reimplemented from aitools::invertedindex::Value.

Definition at line 214 of file Single.hpp.

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

Here is the call graph for this function:

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

Interprets a byte buffer.

Implements aitools::invertedindex::Value.

Definition at line 205 of file Single.hpp.

References aitools::invertedindex::Single< T >::element_, and aitools::invertedindex::Single< T >::sizeof_T.

Referenced by aitools::invertedindex::Single< T >::wrap().

Here is the caller graph for this function:


Member Data Documentation

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

Definition at line 34 of file Single.hpp.

template<typename T>
T aitools::invertedindex::Single< T >::element_ [private]
template<typename T>
const size_t aitools::invertedindex::Single< T >::sizeof_T = sizeof(T) [static]

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