strusAnalyzer  0.17
Public Member Functions | List of all members
strus::analyzer::Position Struct Reference

Structure describing a position in a document source by segment and offset. More...

#include <position.hpp>

Public Member Functions

 Position ()
 Default constructor. More...
 
 Position (int seg_, int ofs_)
 Constructor. More...
 
 Position (const Position &o)
 Copy constructor. More...
 
int seg () const
 Get the position of the segment in the original source. More...
 
int ofs () const
 Get the byte position in the translated document segment (UTF-8) More...
 
void setSeg (int seg_)
 Set the segment position. More...
 
void setOfs (int ofs_)
 Set the byte offset in the segment. More...
 
int compare (const Position &o) const
 Compare with another position. More...
 
bool operator<= (const Position &o) const
 
bool operator== (const Position &o) const
 
bool operator< (const Position &o) const
 
bool operator> (const Position &o) const
 

Detailed Description

Structure describing a position in a document source by segment and offset.

Constructor & Destructor Documentation

strus::analyzer::Position::Position ( )
inline

Default constructor.

strus::analyzer::Position::Position ( int  seg_,
int  ofs_ 
)
inline

Constructor.

Parameters
[in]seg_the position of the segment in the original source
[in]ofs_the byte position in the translated document segment (UTF-8)
strus::analyzer::Position::Position ( const Position o)
inline

Copy constructor.

Member Function Documentation

int strus::analyzer::Position::compare ( const Position o) const
inline

Compare with another position.

int strus::analyzer::Position::ofs ( ) const
inline

Get the byte position in the translated document segment (UTF-8)

bool strus::analyzer::Position::operator< ( const Position o) const
inline
bool strus::analyzer::Position::operator<= ( const Position o) const
inline
bool strus::analyzer::Position::operator== ( const Position o) const
inline
bool strus::analyzer::Position::operator> ( const Position o) const
inline
int strus::analyzer::Position::seg ( ) const
inline

Get the position of the segment in the original source.

void strus::analyzer::Position::setOfs ( int  ofs_)
inline

Set the byte offset in the segment.

void strus::analyzer::Position::setSeg ( int  seg_)
inline

Set the segment position.


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