Rosetta
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
numeric::expression_parser::TokenSet Class Reference

#include <Arithmetic.hh>

Inheritance diagram for numeric::expression_parser::TokenSet:
Inheritance graph
[legend]

Public Member Functions

 ~TokenSet () override
 Automatically generated virtual destructor for class deriving directly from VirtualBase. More...
 
 TokenSet ()
 
void append (TokenCOP token)
 
bool empty () const
 Are there no more tokens remaining? More...
 
TokenCOP top () const
 
void pop ()
 
std::string log_error () const
 Print contents after parser has encountered an error. More...
 
std::string print () const
 
- Public Member Functions inherited from utility::VirtualBase
 VirtualBase ()=default
 Default constructor. More...
 
virtual ~VirtualBase ()=default
 The virtual destructor is one of the main reasons for the VirtualBase class. More...
 
 VirtualBase (VirtualBase const &)=default
 
 VirtualBase (VirtualBase &&)=default
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Protected Member Functions

std::string print_to_curr_pos () const
 in the event of an error message, print the tokens up to the current token. More...
 

Private Attributes

std::list< TokenCOPtokens_
 
std::list< TokenCOP >::iterator curr_pos_
 

Constructor & Destructor Documentation

◆ ~TokenSet()

numeric::expression_parser::TokenSet::~TokenSet ( )
overridedefault

Automatically generated virtual destructor for class deriving directly from VirtualBase.

Auto-generated virtual destructor

◆ TokenSet()

numeric::expression_parser::TokenSet::TokenSet ( )
default

Member Function Documentation

◆ append()

void numeric::expression_parser::TokenSet::append ( TokenCOP  token)

Appends the new token to the list and resets the token iterator to the beginning of the list

References curr_pos_, and tokens_.

◆ empty()

bool numeric::expression_parser::TokenSet::empty ( ) const

◆ log_error()

std::string numeric::expression_parser::TokenSet::log_error ( ) const

◆ pop()

void numeric::expression_parser::TokenSet::pop ( )

◆ print()

std::string numeric::expression_parser::TokenSet::print ( ) const

References tokens_.

◆ print_to_curr_pos()

std::string numeric::expression_parser::TokenSet::print_to_curr_pos ( ) const
protected

in the event of an error message, print the tokens up to the current token.

References count, curr_pos_, test.T008_Serialization::oss, and tokens_.

Referenced by log_error(), and pop().

◆ top()

TokenCOP numeric::expression_parser::TokenSet::top ( ) const

Member Data Documentation

◆ curr_pos_

std::list< TokenCOP >::iterator numeric::expression_parser::TokenSet::curr_pos_
private

◆ tokens_

std::list< TokenCOP > numeric::expression_parser::TokenSet::tokens_
private

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