Limbo 3.5.4
Loading...
Searching...
No Matches
ErrorHandler< Iterator > Struct Template Reference

error handler More...

#include <ErrorHandler.h>

Classes

struct  result
 probably used as some kind of type traits More...

Public Member Functions

 ErrorHandler (Iterator first, Iterator last)
 constructor
template<typename Message, typename What>
void operator() (Message const &message, What const &what, Iterator err_pos) const
 API to invoke the error handler.
Iterator get_pos (Iterator err_pos, int &line) const
 get position of error
std::string get_line (Iterator err_pos) const
 get line from iterator

Public Attributes

Iterator first
 begin iterator
Iterator last
 end iterator
std::vector< Iterator > iters
 not sure what it is used and why it is here

Detailed Description

template<typename Iterator>
struct ErrorHandler< Iterator >

error handler

Template Parameters
Iteratoriterator of text

Definition at line 23 of file ErrorHandler.h.

Constructor & Destructor Documentation

◆ ErrorHandler()

template<typename Iterator>
ErrorHandler< Iterator >::ErrorHandler ( Iterator first,
Iterator last )
inline

constructor

Parameters
first,lastbegin and end iterators to text

Definition at line 36 of file ErrorHandler.h.

Member Function Documentation

◆ get_line()

template<typename Iterator>
std::string ErrorHandler< Iterator >::get_line ( Iterator err_pos) const
inline

get line from iterator

Parameters
err_positerator to error position
Returns
line string

Definition at line 101 of file ErrorHandler.h.

◆ get_pos()

template<typename Iterator>
Iterator ErrorHandler< Iterator >::get_pos ( Iterator err_pos,
int & line ) const
inline

get position of error

Parameters
err_positerator of error position
lineline number
Returns
iterator to the starting line of the error

Definition at line 72 of file ErrorHandler.h.

◆ operator()()

template<typename Iterator>
template<typename Message, typename What>
void ErrorHandler< Iterator >::operator() ( Message const & message,
What const & what,
Iterator err_pos ) const
inline

API to invoke the error handler.

Template Parameters
Messagemessage
Whatwhat error it is
Parameters
messagemessage to print
whatwhat error to print
err_posposition of error occurred

Definition at line 46 of file ErrorHandler.h.

Member Data Documentation

◆ first

template<typename Iterator>
Iterator ErrorHandler< Iterator >::first

begin iterator

Definition at line 110 of file ErrorHandler.h.

◆ iters

template<typename Iterator>
std::vector<Iterator> ErrorHandler< Iterator >::iters

not sure what it is used and why it is here

Definition at line 112 of file ErrorHandler.h.

◆ last

template<typename Iterator>
Iterator ErrorHandler< Iterator >::last

end iterator

Definition at line 111 of file ErrorHandler.h.


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