Colibri Core
Public Member Functions | Public Attributes | Friends | List of all members
IndexReference Class Reference

Reference to a position in the corpus. More...

#include <datatypes.h>

Public Member Functions

 IndexReference ()
 
 IndexReference (uint32_t sentence, uint16_t token)
 
 IndexReference (std::istream *in)
 
 IndexReference (const IndexReference &other)
 
void write (std::ostream *out) const
 
bool operator< (const IndexReference &other) const
 
bool operator> (const IndexReference &other) const
 
bool operator== (const IndexReference &other) const
 
bool operator!= (const IndexReference &other) const
 
IndexReference operator+ (const int other) const
 
std::string tostring () const
 

Public Attributes

uint32_t sentence
 
uint16_t token
 

Friends

std::ostream & operator<< (std::ostream &out, const IndexReference &iref)
 

Detailed Description

Reference to a position in the corpus.

Constructor & Destructor Documentation

IndexReference::IndexReference ( )
inline
IndexReference::IndexReference ( uint32_t  sentence,
uint16_t  token 
)
inline

Constructor for a reference to a position in the corpus, sentences (or whatever other unit delimits your data) start at 1, tokens start at 0

IndexReference::IndexReference ( std::istream *  in)
inline
IndexReference::IndexReference ( const IndexReference other)
inline

Member Function Documentation

bool IndexReference::operator!= ( const IndexReference other) const
inline
IndexReference IndexReference::operator+ ( const int  other) const
inline
bool IndexReference::operator< ( const IndexReference other) const
inline
bool IndexReference::operator== ( const IndexReference other) const
inline
bool IndexReference::operator> ( const IndexReference other) const
inline
std::string IndexReference::tostring ( ) const
inline
void IndexReference::write ( std::ostream *  out) const
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const IndexReference iref 
)
friend

Member Data Documentation

uint32_t IndexReference::sentence
uint16_t IndexReference::token

The documentation for this class was generated from the following file: